From: Sandra Loosemore <sandra@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: RFA: fix compilation warning
Date: Fri, 26 Dec 2008 18:56:00 -0000 [thread overview]
Message-ID: <49552887.7080800@codesourcery.com> (raw)
[-- 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. */
next reply other threads:[~2008-12-26 18:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-26 18:56 Sandra Loosemore [this message]
2008-12-26 18:59 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49552887.7080800@codesourcery.com \
--to=sandra@codesourcery.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox