From: Keith Owens <kaos@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: [patch 2.6.7-rc3] Remove warnings when unwind debug is turned on
Date: Fri, 11 Jun 2004 14:19:24 +0000 [thread overview]
Message-ID: <18662.1086963564@ocs3.ocs.com.au> (raw)
Turning on UNW_DEBUG generates warnings for incorrect number of
parameters for formats and several cases of "suggest explicit braces to
avoid ambiguous `else'", because UNW_DPRINT contains an if statement.
Signed-off-by: Keith Owens <kaos@sgi.com>
Index: linux/arch/ia64/kernel/unwind.c
=================================--- linux.orig/arch/ia64/kernel/unwind.c Sat Jun 12 00:08:24 2004
+++ linux/arch/ia64/kernel/unwind.c Sat Jun 12 00:13:56 2004
@@ -395,9 +395,10 @@ unw_access_gr (struct unw_frame_info *in
}
if (write) {
- if (read_only(addr))
- UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n");
- else {
+ if (read_only(addr)) {
+ UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n",
+ __FUNCTION__);
+ } else {
*addr = *val;
if (*nat)
*nat_addr |= nat_mask;
@@ -442,9 +443,10 @@ unw_access_br (struct unw_frame_info *in
return -1;
}
if (write)
- if (read_only(addr))
- UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n");
- else
+ if (read_only(addr)) {
+ UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n",
+ __FUNCTION__);
+ } else
*addr = *val;
else
*val = *addr;
@@ -490,9 +492,10 @@ unw_access_fr (struct unw_frame_info *in
}
if (write)
- if (read_only(addr))
- UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n");
- else
+ if (read_only(addr)) {
+ UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n",
+ __FUNCTION__);
+ } else
*addr = *val;
else
*val = *addr;
@@ -586,9 +589,10 @@ unw_access_ar (struct unw_frame_info *in
}
if (write) {
- if (read_only(addr))
- UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n");
- else
+ if (read_only(addr)) {
+ UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n",
+ __FUNCTION__);
+ } else
*addr = *val;
} else
*val = *addr;
@@ -606,9 +610,10 @@ unw_access_pr (struct unw_frame_info *in
addr = &info->sw->pr;
if (write) {
- if (read_only(addr))
- UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n");
- else
+ if (read_only(addr)) {
+ UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n",
+ __FUNCTION__);
+ } else
*addr = *val;
} else
*val = *addr;
reply other threads:[~2004-06-11 14:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=18662.1086963564@ocs3.ocs.com.au \
--to=kaos@sgi.com \
--cc=linux-ia64@vger.kernel.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