On Wed, 2007-04-25 at 19:21 +0100, Pedro Alves wrote:
> Danny Backx escreveu:
> > Next question now is why I none of the tools available help me in
> > detecting the problem. I've tried to reproduce this in a small program,
> > haven't succeeded yet.
> 
> 
> Try using the gcc format attribute on your Log
> function to have a wrong format/param warning
> like you have for printf.

I didn't know how that worked, I do now. Thanks for the pointer.

My Log function is now defined as
        void Log(int level, const char *fmt, ...)
                __attribute__ ((format (printf, 2, 3)));

and with the -Wall argument, the compiler detects the problem.

        Danny
-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info

Attachment: signature.asc
Description: This is a digitally signed message part

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to