* RFA: fix compilation warning
@ 2008-12-26 18:56 Sandra Loosemore
2008-12-26 18:59 ` Daniel Jacobowitz
0 siblings, 1 reply; 2+ messages in thread
From: Sandra Loosemore @ 2008-12-26 18:56 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 201 bytes --]
I attempted to do a fresh checkout and build just now, and found it was failing
with a variable-maybe-used-uninitialized compiler diagnostic. The attached
patch fixes it. OK to check in?
-Sandra
[-- Attachment #2: gdb-compile.log --]
[-- Type: text/x-log, Size: 137 bytes --]
2008-12-26 Sandra Loosemore <sandra@codesourcery.com>
gdb/
* breakpoint.c (update_watchpoint): Refactor to avoid compiler
warning.
[-- Attachment #3: gdb-compile.patch --]
[-- Type: text/x-patch, Size: 1269 bytes --]
Index: gdb/breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.367
diff -u -r1.367 breakpoint.c
--- gdb/breakpoint.c 22 Dec 2008 04:37:37 -0000 1.367
+++ gdb/breakpoint.c 26 Dec 2008 18:47:54 -0000
@@ -898,19 +898,23 @@
if ((b->type == bp_watchpoint || b->type == bp_hardware_watchpoint)
&& reparse)
{
- int i, mem_cnt, target_resources_ok, other_type_used;
+ int i, mem_cnt, other_type_used;
i = hw_watchpoint_used_count (bp_hardware_watchpoint,
&other_type_used);
mem_cnt = can_use_hardware_watchpoint (val_chain);
- if (mem_cnt)
- target_resources_ok = TARGET_CAN_USE_HARDWARE_WATCHPOINT
- (bp_hardware_watchpoint, i + mem_cnt, other_type_used);
- if (!mem_cnt || target_resources_ok <= 0)
+ if (!mem_cnt)
b->type = bp_watchpoint;
else
- b->type = bp_hardware_watchpoint;
+ {
+ int target_resources_ok = TARGET_CAN_USE_HARDWARE_WATCHPOINT
+ (bp_hardware_watchpoint, i + mem_cnt, other_type_used);
+ if (target_resources_ok <= 0)
+ b->type = bp_watchpoint;
+ else
+ b->type = bp_hardware_watchpoint;
+ }
}
/* Look at each value on the value chain. */
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: RFA: fix compilation warning
2008-12-26 18:56 RFA: fix compilation warning Sandra Loosemore
@ 2008-12-26 18:59 ` Daniel Jacobowitz
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2008-12-26 18:59 UTC (permalink / raw)
To: Sandra Loosemore; +Cc: gdb-patches
On Fri, Dec 26, 2008 at 01:55:03PM -0500, Sandra Loosemore wrote:
> I attempted to do a fresh checkout and build just now, and found it was
> failing with a variable-maybe-used-uninitialized compiler diagnostic. The
> attached patch fixes it. OK to check in?
>
> -Sandra
>
> 2008-12-26 Sandra Loosemore <sandra@codesourcery.com>
>
> gdb/
> * breakpoint.c (update_watchpoint): Refactor to avoid compiler
> warning.
This is OK.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-12-26 18:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-26 18:56 RFA: fix compilation warning Sandra Loosemore
2008-12-26 18:59 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox