This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: compile warnings
On Sat, Apr 02, 2005 at 10:16:54PM -0500, Daniel Jacobowitz wrote:
> On Sat, Apr 02, 2005 at 10:05:05PM -0500, Bob Rossi wrote:
> > Hi,
> >
> > Is this normal? This is using current CVS with
> > $ gcc --version
> > gcc (GCC) 3.3.5 (Debian 1:3.3.5-8)
> >
> > ../../src/gdb/printcmd.c: In function `printf_command':
> > ../../src/gdb/printcmd.c:1962: warning: format not a string literal, argument types not checked
> > ../../src/gdb/printcmd.c:1968: warning: format not a string literal, argument types not checked
> > ../../src/gdb/printcmd.c:1975: warning: format not a string literal, argument types not checked
> > ../../src/gdb/printcmd.c:1985: warning: format not a string literal, argument types not checked
>
> Yep. There's an enforced -Wno-error on that file, for this reason.
gcc -c -g -I. -I../../src/gdb -I../../src/gdb/config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I../../src/gdb/../include/opcode -I../../src/gdb/../readline/.. -I../bfd -I../../src/gdb/../bfd -I../../src/gdb/../include -I../intl -I../../src/gdb/../intl -DMI_OUT=1 -DTUI=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wformat-nonliteral -Wunused-label -Wunused-function ../../src/gdb/printcmd.c
../../src/gdb/printcmd.c: In function `printf_command':
../../src/gdb/printcmd.c:1962: warning: format not a string literal, argument types not checked
../../src/gdb/printcmd.c:1968: warning: format not a string literal, argument types not checked
../../src/gdb/printcmd.c:1975: warning: format not a string literal, argument types not checked
../../src/gdb/printcmd.c:1985: warning: format not a string literal, argument types not checked
Making init.c
I configured GDB as 'CFLAGS=-g ./configure --prefix=...'.
However, as you can see, I don't have the -Wno-error. But if this is a
known warning, it doesn't matter anyways.
Thanks,
Bob Rossi