Commit bba5e574 authored by Keith Owens's avatar Keith Owens Committed by David Mosberger

[PATCH] ia64: Remove warnings when unwind debug is turned on

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: default avatarKeith Owens <kaos@sgi.com>
Signed-off-by: default avatarDavid Mosberger <davidm@hpl.hp.com>
parent dda5882c
......@@ -385,9 +385,10 @@ unw_access_gr (struct unw_frame_info *info, int regnum, unsigned long *val, char
}
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;
......@@ -432,9 +433,10 @@ unw_access_br (struct unw_frame_info *info, int regnum, unsigned long *val, int
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;
......@@ -480,9 +482,10 @@ unw_access_fr (struct unw_frame_info *info, int regnum, struct ia64_fpreg *val,
}
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;
......@@ -576,9 +579,10 @@ unw_access_ar (struct unw_frame_info *info, int regnum, unsigned long *val, int
}
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;
......@@ -596,9 +600,10 @@ unw_access_pr (struct unw_frame_info *info, unsigned long *val, int write)
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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment