snprintf warnings
Eli Zaretskii
eliz@gnu.org
Sat Nov 13 15:44:00 GMT 2004
When I build GDB with DJGPP, GCC whines like so:
remote.c: In function `remote_xfer_partial':
remote.c:4920: warning: implicit declaration of function `snprintf'
(I see this warning for other source files as well.)
This happens because DJGPP doesn't have `snprintf' in its library, so
the libiberty version is used. But there's no prototype for the
libiberty `snprintf' anywhere, thus the warning. The code seems to be
relying on getting the prototype from stdio.h, but if the library
doesn't have the function, we cannot expect to have the prototype on a
standard header.
What would be the canonical way to fix that?
More information about the Gdb
mailing list