08 Oct 2012, 18:01
Generic-user-small

Gareth Edwards (4 posts)

Found this while I was trying to remove the OS X gcc warnings properly.

void FakeTimeService_MinuteIsUp(void)
{
    if (callback != NULL);
        callback();
}

should be

void FakeTimeService_MinuteIsUp(void)
{
    if (callback != NULL)
        callback();
}

Note the extra semicolon in the first version.

Perhaps the test code needs meta-test code? ;)

Cheers Gareth

23 Oct 2012, 03:48
James2009_pragsmall

James Grenning (137 posts)

That’s the problem with putting in NULL checks that are not tested!

  You must be logged in to comment