Mail Archives: djgpp-workers/2001/06/09/05:16:20
According to Eli Zaretskii:
> > Some warnings I don't understand and can't get to go away (I only
> > tried to remove the todigit ones and gave up):
> >
> > make -C ansi/stdio
> > gcc ... -c doprnt.c
> > cc1.exe: warnings being treated as errors
> > doprnt.c: In function `_doprnt':
> > doprnt.c:167: warning: passing arg 1 of `todigit' with different width due to prototype
>
> Change `todigit' (near the beginning of doprnt.c) to accept an int
> instead of a char, and the warning will go away.
Yes, but *fmt is a char and todigit expects a char. The warning
doesn't make sense to me. And you seem to say *fmt is an int?
...
> Basically, this warning alerts you to any function whose prototype
> modifies the default promotion of arguments. This flags functions
> whose prototypes include char, short, and float arguments. IMHO,
> these practices are unsafe and should be avoided.
They are? Isn't that what prototypes are for?
Right,
MartinS
- Raw text -