From d07205c2f7de1d447e2cad21372b113e694765ce Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Tue, 3 May 2011 07:29:17 +0000 Subject: [PATCH] gdb/ Fix false GCC warning. * breakpoint.c (do_enable_breakpoint): Initialize orig_enable_state. --- gdb/ChangeLog | 5 +++++ gdb/breakpoint.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 32c6491442a..484ace57220 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2011-05-03 Jan Kratochvil + + Fix false GCC warning. + * breakpoint.c (do_enable_breakpoint): Initialize orig_enable_state. + 2011-05-03 Thiago Jung Bauermann * breakpoint.c (update_watchpoint): Move code to change diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index e265135fdd9..d8eb891abc7 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -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) -- 2.30.2