gdb/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 3 May 2011 07:29:17 +0000 (07:29 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 3 May 2011 07:29:17 +0000 (07:29 +0000)
Fix false GCC warning.
* breakpoint.c (do_enable_breakpoint): Initialize orig_enable_state.

gdb/ChangeLog
gdb/breakpoint.c

index 32c6491442af738b0e07ee84ae692aef8d4c5b6d..484ace57220be54989f224bbf13f2d6c9363f334 100644 (file)
@@ -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
index e265135fdd900368a44b3f986992b04bbb2b413e..d8eb891abc7d4d14f1ee5a6770c76ee1e6d9514b 100644 (file)
@@ -11468,7 +11468,8 @@ do_enable_breakpoint (struct breakpoint *bpt, enum bpdisp disposition)
 
   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)