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 ...@@ -385,9 +385,10 @@ unw_access_gr (struct unw_frame_info *info, int regnum, unsigned long *val, char
} }
if (write) { if (write) {
if (read_only(addr)) if (read_only(addr)) {
UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n"); UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n",
else { __FUNCTION__);
} else {
*addr = *val; *addr = *val;
if (*nat) if (*nat)
*nat_addr |= nat_mask; *nat_addr |= nat_mask;
...@@ -432,9 +433,10 @@ unw_access_br (struct unw_frame_info *info, int regnum, unsigned long *val, int ...@@ -432,9 +433,10 @@ unw_access_br (struct unw_frame_info *info, int regnum, unsigned long *val, int
return -1; return -1;
} }
if (write) if (write)
if (read_only(addr)) if (read_only(addr)) {
UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n"); UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n",
else __FUNCTION__);
} else
*addr = *val; *addr = *val;
else else
*val = *addr; *val = *addr;
...@@ -480,9 +482,10 @@ unw_access_fr (struct unw_frame_info *info, int regnum, struct ia64_fpreg *val, ...@@ -480,9 +482,10 @@ unw_access_fr (struct unw_frame_info *info, int regnum, struct ia64_fpreg *val,
} }
if (write) if (write)
if (read_only(addr)) if (read_only(addr)) {
UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n"); UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n",
else __FUNCTION__);
} else
*addr = *val; *addr = *val;
else else
*val = *addr; *val = *addr;
...@@ -576,9 +579,10 @@ unw_access_ar (struct unw_frame_info *info, int regnum, unsigned long *val, int ...@@ -576,9 +579,10 @@ unw_access_ar (struct unw_frame_info *info, int regnum, unsigned long *val, int
} }
if (write) { if (write) {
if (read_only(addr)) if (read_only(addr)) {
UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n"); UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n",
else __FUNCTION__);
} else
*addr = *val; *addr = *val;
} else } else
*val = *addr; *val = *addr;
...@@ -596,9 +600,10 @@ unw_access_pr (struct unw_frame_info *info, unsigned long *val, int write) ...@@ -596,9 +600,10 @@ unw_access_pr (struct unw_frame_info *info, unsigned long *val, int write)
addr = &info->sw->pr; addr = &info->sw->pr;
if (write) { if (write) {
if (read_only(addr)) if (read_only(addr)) {
UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n"); UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n",
else __FUNCTION__);
} else
*addr = *val; *addr = *val;
} else } else
*val = *addr; *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