This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Stabs parsing regression from GDB 6.6 to GDB 6.6.90
Pierre Muller wrote:
Pedro,
you patch to main leads to a warning when compiling stabsread.o
because sign_bit might be used uninitialized.
Even though this is a false alarm,
as sign_bit is set if two_complement_representation is,
and used later only if two_complement_representation is set;
we need to correct this, as it leads to a compilation failure if
-Werror is used.
Ah, sorry and thanks. I built with -O0 only ...
Checked the attached in, as obvious.
--
Cheers,
Pedro Alves
2007-10-09 Pedro Alves <pedro_alves@portugalmail.pt>
* stabsread.c (read_huge_number): Initialize local variable to 0.
---
gdb/stabsread.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: src/gdb/stabsread.c
===================================================================
--- src.orig/gdb/stabsread.c 2007-10-09 09:58:42.000000000 +0100
+++ src/gdb/stabsread.c 2007-10-09 09:58:52.000000000 +0100
@@ -3703,7 +3703,7 @@ read_huge_number (char **pp, int end, in
{
char *p = *pp;
int sign = 1;
- int sign_bit;
+ int sign_bit = 0;
long n = 0;
int radix = 10;
char overflow = 0;