c/1017: -Wmissing-format-attribute gives too many warnings

Joseph S. Myers jsm28@cam.ac.uk
Fri Dec 8 11:20:00 GMT 2000


On 8 Dec 2000, Andreas Jaeger wrote:

> >> extern void dbg_log (const char *str, ...)
> >> __attribute__ ((__format__ (__printf__, 1, 0)));

> It came from real code.  Inspired by your patch for syslog on
> libc-alpha, I added the format checking code to nscd/dbg_log.h - but
> it seems I misunderstood the GCC manual.  I'll change glibc now to use
> a 1 for the attribute.

 ... that should of course be (__printf__, 1, 2).

-- 
Joseph S. Myers
jsm28@cam.ac.uk



More information about the Gcc-bugs mailing list