This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/28492] -Wmissing-format-attribute causes warning for vsnprintf()
- From: "h dot b dot furuseth at usit dot uio dot no" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jan 2007 18:40:24 -0000
- Subject: [Bug c/28492] -Wmissing-format-attribute causes warning for vsnprintf()
- References: <bug-28492-13012@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from h dot b dot furuseth at usit dot uio dot no 2007-01-13 18:40 -------
The warning is a bit misleading,
"function might be possible candidate for 'printf' format attribute"
means the _calling_ function might be such a candidate, not the function
being called on the line it warns about.
The warning is still spurious in this case though, and gcc could tell that:
A function cannot be such a candidate if it has a prototype without variable
arguments. Here is another example of such a spurious warning:
Hallvard
--
h dot b dot furuseth at usit dot uio dot no changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |h dot b dot furuseth at usit
| |dot uio dot no
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28492