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] Fix breakpoint.c false GCC warning


Hi,

reported by Andreas Tobler on IRC, it probably happens on some old GCCs or so.

Checked in.


Regards,
Jan


http://sourceware.org/ml/gdb-cvs/2011-05/msg00011.html

--- src/gdb/ChangeLog	2011/05/03 05:02:48	1.12972
+++ src/gdb/ChangeLog	2011/05/03 07:29:14	1.12973
@@ -1,3 +1,8 @@
+2011-05-03  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Fix false GCC warning.
+	* breakpoint.c (do_enable_breakpoint): Initialize orig_enable_state.
+
 2011-05-03  Thiago Jung Bauermann  <bauerman@br.ibm.com>
 
 	* breakpoint.c (update_watchpoint): Move code to change
--- src/gdb/breakpoint.c	2011/05/03 05:02:54	1.572
+++ src/gdb/breakpoint.c	2011/05/03 07:29:17	1.573
@@ -11468,7 +11468,8 @@
 
   if (is_watchpoint (bpt))
     {
-      enum enable_state orig_enable_state;
+      /* Initialize it just to avoid a GCC false warning.  */
+      enum enable_state orig_enable_state = 0;
       struct gdb_exception e;
 
       TRY_CATCH (e, RETURN_MASK_ALL)


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