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]

fix compilation error under gcc 3.2.3 (warning treated as error)


Fix "duplicate const" compilation error (warning treated as error)
under gcc 3.2.3 (AS3 Linux, gcc version 3.2.3 20030502 (Red Hat Linux
3.2.3-20)).

Typedef for reloc_howto_type already has const, remove
unnecessary const at line 1174 bfd/elf32-i386.c



*** ./bfd/elf32-i386.c  Thu Feb 14 10:07:44 2008
--- ./bfd/elf32-i386.c.000      Thu Feb 14 10:07:34 2008
***************
*** 1171,1177 ****
                                          symtab_hdr, sym_hashes,
                                          from_type, rel, relend))
      {
!       reloc_howto_type *from, *to;

        from = elf_i386_rtype_to_howto (abfd, from_type);
        to = elf_i386_rtype_to_howto (abfd, to_type);
--- 1171,1177 ----
                                          symtab_hdr, sym_hashes,
                                          from_type, rel, relend))
      {
!       const reloc_howto_type *from, *to;

        from = elf_i386_rtype_to_howto (abfd, from_type);
        to = elf_i386_rtype_to_howto (abfd, to_type);



[1]
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I.
-I.././bfd -I. -DTRAD_CORE   -I. -I.././bfd -I.././bfd/../include
-W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c -o
elf32-i386.lo elf32-i386.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.././bfd -I. -DTRAD_CORE
-I. -I.././bfd -I.././bfd/../include -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -Werror -g -O2 -c elf32-i386.c -o elf32-i386.o
cc1: warnings being treated as errors
elf32-i386.c: In function `elf_i386_tls_transition':
elf32-i386.c:1174: warning: duplicate `const'
elf32-i386.c:1174: warning: duplicate `const'
make[4]: *** [elf32-i386.lo] Error 1


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