Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* fix compilation error under gcc 3.2.3 (warning treated as error)
@ 2008-02-14  7:37 Yakov Lerner
  2008-02-14 16:48 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Yakov Lerner @ 2008-02-14  7:37 UTC (permalink / raw)
  To: gdb-patches

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-14 16:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-14  7:37 fix compilation error under gcc 3.2.3 (warning treated as error) Yakov Lerner
2008-02-14 16:48 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox