[MPlayer-cvslog] r32906 - trunk/gui/skin/font.c

Ingo Brückl ib at wupperonline.de
Thu Feb 17 18:30:44 CET 2011

Reimar Döffinger wrote on Thu, 17 Feb 2011 17:54:45 +0100:

>> Yes, that's true, but it "lies" about the parameter and gives the compiler no
>> chance to warn me if I call gfree(p) instead of gfree(&p)!

> Neither will it warn you with the cast,

That's true, because the cast is there to give the compiler no reason to
warn. The cast clearly indicates that one was aware of the type.

The warning only appears without the cast which indicates that one might not
be aware of the type.

> In addition to made-up things like doing nfree(p++),

Yeah, but I surely don't want to process the pointer further.

> your macro construction also fails
> If (a) nfree(p); else a = p;

I know. Clément already suggested the do {...} while(0) definition.

I got your point. I was not suggesting that such a macro would always be a
good idea, but I think it might be for this purpose.


More information about the MPlayer-cvslog mailing list