c/1017: -Wmissing-format-attribute gives too many warnings
Joseph S. Myers
jsm28@cam.ac.uk
Fri Dec 8 11:26:00 GMT 2000
The following reply was made to PR c/1017; it has been noted by GNATS.
From: "Joseph S. Myers" <jsm28@cam.ac.uk>
To: Andreas Jaeger <aj@suse.de>
Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org
Subject: Re: c/1017: -Wmissing-format-attribute gives too many warnings
Date: Fri, 8 Dec 2000 19:20:25 +0000 (GMT)
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-prs
mailing list