This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB 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]

snprintf warnings


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?


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