msvcrt: scanf fix a typo

Dan Kegel dank at kegel.com
Fri Sep 19 17:51:00 CDT 2008


Here's the gcc error:
> scanf.c:66: warning: unknown conversion type character `P' in format

I'm not a programmer, but I play one on TV.  And here's what I
came up with in five minutes of typing and not enough thinking:

That particular error depends on gcc knowing intimate details of
sscanf.   Unless we teach gcc about the particular sscanf we're
implementing, it's likely to give false errors.

It could be that the line

#include <stdio.h>

at the top of that file is introducing a conflict.

See
http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Function-Attributes.html#Function-Attributes
for the function attributes used to teach gcc about scanf-like format arguments.

This may be an example of the problem Juan was anticipating, where
people rush to provide fixes to problems that they don't fully
understand, just to try to get rid of gcc warnings :-(
- Dan



More information about the wine-devel mailing list