This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/28492] -Wmissing-format-attribute causes warning for vsnprintf()



------- Comment #2 from bernard dot van dot duijnen at oracle dot com  2010-04-04 15:08 -------
The message may be unclear, but is in itself correct.
Your function vsnprintf_one needs an annotation because
its first argument is a format string that can be checked itself
to be a valid format. As there are no arguments to compare to, the
first-to-check should be zero.


static void vsnprintf_one(char *self, va_list arglist)
   __attribute__ ((format (printf, 1, 0)));


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28492


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]