This is the mail archive of the gdb-patches@sourceware.org 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]

RE: [RFA, 3 of 3] save/restore process record, part 3 (save/restore)


  I still have problems to compile
on Cygwin:

gcc -g -O2   -I. -I../../src/gdb -I../../src/gdb/common
-I../../src/gdb/config -
DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H
-I../../src/gdb/../incl
ude/opcode -I../../src/gdb/../readline/.. -I../bfd -I../../src/gdb/../bfd
-I../.
./src/gdb/../include -I../libdecnumber -I../../src/gdb/../libdecnumber
-I../../
src/gdb/gnulib -Ignulib  -DMI_OUT=1 -DTUI=1   -Wall
-Wdeclaration-after-statemen
t -Wpointer-arith -Wformat-nonliteral -Wno-unused -Wunused-value -Wno-switch
-Wn
o-char-subscripts -Werror -c -o record.o -MT record.o -MMD -MP -MF
.deps/record.
Tpo ../../src/gdb/record.c
../../src/gdb/record.c: In function `record_restore':
../../src/gdb/record.c:2021: warning: unsigned int format, uint32_t arg (arg
2)
../../src/gdb/record.c: In function `cmd_record_save':
../../src/gdb/record.c:2288: warning: unsigned int format, uint32_t arg (arg
2)
make[1]: *** [record.o] Error 1


 Furthermore, there is a '%ll' rule
in ARI that states that:
Do not use printf("%ll"), instead use printf("%s",phex()) to dump a `long
long' value
Shouldn't this also concern '%lu'?

Do we really need long for sizeof function returns?
Are there any types (use in record.c) for which 
sizeof would not fit into a regular "unsigned int" ?

Pierre Muller
as ARI "maintainer"...

> -----Message d'origine-----
> De?: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Paul Pluzhnikov
> Envoyé?: Friday, October 23, 2009 3:03 AM
> À?: Michael Snyder
> Cc?: Hui Zhu; Eli Zaretskii; gdb-patches@sourceware.org
> Objet?: Re: [RFA, 3 of 3] save/restore process record, part 3
> (save/restore)
> 
> On Thu, Oct 22, 2009 at 5:45 PM, Paul Pluzhnikov
> <ppluzhnikov@google.com> wrote:
> 
> > More problems: on Linux/x86_64:
> >
> 
> > ../../src/gdb/record.c:2062: warning: format '%d' expects type 'int',
> > but argument 3 has type 'long unsigned int'
> 
> I've committed attached patch as obvious.
> 
> Thanks,
> --
> Paul Pluzhnikov
> 
> 2009-10-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
> 
> 	* record.c (record_restore, cmd_record_save): Fix warnings.


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