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]

[obv] Unbreak gdbserver build


I run cross a build failure on trunk when testing my approved patches.

gcc -c -g -O2    -I. -I../../../cvs/src/gdb/gdbserver
-I../../../cvs/src/gdb/gdbserver/../common
-I../../../cvs/src/gdb/gdbserver/../regformats
-I../../../cvs/src/gdb/gdbserver/../../include -Wall
-Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral
-Wno-char-subscripts -Werror ../../../cvs/src/gdb/gdbserver/i386-low.c
cc1: warnings being treated as errors
../../../cvs/src/gdb/gdbserver/i386-low.c: In function
âi386_low_stopped_data_addressâ:
../../../cvs/src/gdb/gdbserver/i386-low.c:569: error: âcontrolâ may be
used uninitialized in this function

It is obvious.  Committed.

-- 
Yao (éå)

2011-12-14  Yao Qi  <yao@codesourcery.com>

        * i386-low.c (i386_low_stopped_data_address): Initialize local
        variable `control'.

Index: gdbserver/i386-low.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/i386-low.c,v
retrieving revision 1.8
diff -u -r1.8 i386-low.c
--- gdbserver/i386-low.c	13 Dec 2011 16:11:26 -0000	1.8
+++ gdbserver/i386-low.c	14 Dec 2011 07:33:39 -0000
@@ -566,7 +566,7 @@
      data breakpoint trap.  Only fetch it when necessary, to avoid an
      unnecessary extra syscall when no watchpoint triggered.  */
   int control_p = 0;
-  unsigned control;
+  unsigned control = 0;

   /* In non-stop/async, threads can be running while we change the
      global dr_mirror (and friends).  Say, we set a watchpoint, and


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