public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/10024] New: /gdb/infcall.c:197: warning: `funaddr' might be used uninitialized (gcc 3.2 compiler warning + -Werror)
@ 2009-04-02 12:35 Steffen dot DETTMER at ingenico dot com
  2009-04-02 15:59 ` [Bug build/10024] " tromey at redhat dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Steffen dot DETTMER at ingenico dot com @ 2009-04-02 12:35 UTC (permalink / raw)
  To: gdb-prs

older gcc (3.2) gives (false?) warning, because -Werror is set,
gdb cannot be build.




../configure --target=arm-elf --disable-expat --with-expat=no


gcc -c -g -O2   -I. -I../../gdb -I../../gdb/config
-DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H
-I../../gdb/../include/opcode -I../../gdb/../readline/.. -I../bfd
-I../../gdb/../bfd -I../../gdb/../include -I../libdecnumber
-I../../gdb/../libdecnumber   -DMI_OUT=1 -DTUI=1  -Wall
-Wpointer-arith -Wformat-nonliteral -Wno-unused -Wno-switch
-Wno-char-subscripts -Werror ../../gdb/infcall.c
cc1: warnings being treated as errors
../../gdb/infcall.c: In function `find_function_addr':
../../gdb/infcall.c:197: warning: `funaddr' might be used
uninitialized in this function
make[2]: *** [infcall.o] Error 1
make[2]: Leaving directory `/usr/local/build/gdb-6.8/build/gdb'
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory `/usr/local/build/gdb-6.8/build'
make: *** [all] Error 2


steffen@desupr-dev:/local/tmp/steffen_exp/teliport_exp.all/pmng # gcc --version
gcc (GCC) 3.2
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.







CORE_ADDR
find_function_addr (struct value *function, struct type **retval_type)
{
  struct type *ftype = check_typedef (value_type (function));
  enum type_code code = TYPE_CODE (ftype);
  struct type *value_type;
  CORE_ADDR funaddr = 0; /* just init to zero to avoid a (false?) warning */
  ...
}

-- 
           Summary: /gdb/infcall.c:197: warning: `funaddr' might be used
                    uninitialized (gcc 3.2 compiler warning + -Werror)
           Product: gdb
           Version: 6.8
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: build
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: Steffen dot DETTMER at ingenico dot com
                CC: gdb-prs at sourceware dot org
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: arm-elf


http://sourceware.org/bugzilla/show_bug.cgi?id=10024

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug build/10024] /gdb/infcall.c:197: warning: `funaddr' might be used uninitialized (gcc 3.2 compiler warning + -Werror)
  2009-04-02 12:35 [Bug build/10024] New: /gdb/infcall.c:197: warning: `funaddr' might be used uninitialized (gcc 3.2 compiler warning + -Werror) Steffen dot DETTMER at ingenico dot com
@ 2009-04-02 15:59 ` tromey at redhat dot com
  2009-04-02 17:12 ` bauermann at sourceware dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: tromey at redhat dot com @ 2009-04-02 15:59 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From tromey at redhat dot com  2009-04-02 15:59 -------


*** This bug has been marked as a duplicate of 9523 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://sourceware.org/bugzilla/show_bug.cgi?id=10024

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug build/10024] /gdb/infcall.c:197: warning: `funaddr' might be used uninitialized (gcc 3.2 compiler warning + -Werror)
  2009-04-02 12:35 [Bug build/10024] New: /gdb/infcall.c:197: warning: `funaddr' might be used uninitialized (gcc 3.2 compiler warning + -Werror) Steffen dot DETTMER at ingenico dot com
  2009-04-02 15:59 ` [Bug build/10024] " tromey at redhat dot com
@ 2009-04-02 17:12 ` bauermann at sourceware dot org
  2009-04-03 11:56 ` Steffen dot DETTMER at ingenico dot com
  2009-04-03 15:37 ` tromey at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: bauermann at sourceware dot org @ 2009-04-02 17:12 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From bauermann at sourceware dot org  2009-04-02 17:12 -------
Actually, GDB releases used to ship with --disable-werror by default, which I
think is a good idea. GDB 6.8 uses -Werror by default, but I think that was an
oversight.

So, to get GDB 6.8 to build for you, please configure with --disable-werror.
Sorry for the inconvenience

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10024

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug build/10024] /gdb/infcall.c:197: warning: `funaddr' might be used uninitialized (gcc 3.2 compiler warning + -Werror)
  2009-04-02 12:35 [Bug build/10024] New: /gdb/infcall.c:197: warning: `funaddr' might be used uninitialized (gcc 3.2 compiler warning + -Werror) Steffen dot DETTMER at ingenico dot com
  2009-04-02 15:59 ` [Bug build/10024] " tromey at redhat dot com
  2009-04-02 17:12 ` bauermann at sourceware dot org
@ 2009-04-03 11:56 ` Steffen dot DETTMER at ingenico dot com
  2009-04-03 15:37 ` tromey at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: Steffen dot DETTMER at ingenico dot com @ 2009-04-03 11:56 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From Steffen dot DETTMER at ingenico dot com  2009-04-03 11:55 -------
thank you for your very quick reply!

I used the search (http://sourceware.org/bugzilla/) before and searched for
"infcall" but got no reply.

Could it be that the search engine is broken?

(It was just this one (1) single warning,
so I fixed it as below simply by adding = 0,
so I think this warning could be fixed anyway, 
might be better than disabling warnings,
just because of beauty :))



-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10024

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug build/10024] /gdb/infcall.c:197: warning: `funaddr' might be used uninitialized (gcc 3.2 compiler warning + -Werror)
  2009-04-02 12:35 [Bug build/10024] New: /gdb/infcall.c:197: warning: `funaddr' might be used uninitialized (gcc 3.2 compiler warning + -Werror) Steffen dot DETTMER at ingenico dot com
                   ` (2 preceding siblings ...)
  2009-04-03 11:56 ` Steffen dot DETTMER at ingenico dot com
@ 2009-04-03 15:37 ` tromey at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: tromey at redhat dot com @ 2009-04-03 15:37 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From tromey at redhat dot com  2009-04-03 15:37 -------
There's a typo in the other bug's synopsis :)
I'll fix that.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10024

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

end of thread, other threads:[~2009-04-03 15:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-02 12:35 [Bug build/10024] New: /gdb/infcall.c:197: warning: `funaddr' might be used uninitialized (gcc 3.2 compiler warning + -Werror) Steffen dot DETTMER at ingenico dot com
2009-04-02 15:59 ` [Bug build/10024] " tromey at redhat dot com
2009-04-02 17:12 ` bauermann at sourceware dot org
2009-04-03 11:56 ` Steffen dot DETTMER at ingenico dot com
2009-04-03 15:37 ` tromey at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).