aboutsummaryrefslogtreecommitdiff
path: root/sim/common/sim-fpu.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2015-04-29 16:02:02 +0100
committerNick Clifton <nickc@redhat.com>2015-04-29 16:02:02 +0100
commit0a13382c8e708fd9eb15dbc81cedc35e6670090c (patch)
tree9fd21d2d6d7d18ce08e5c4d1f74cf91f57fb631a /sim/common/sim-fpu.c
parent998d2a3ef31378d3d980972dc68f4926b720a7e9 (diff)
downloadgdb-0a13382c8e708fd9eb15dbc81cedc35e6670090c.zip
gdb-0a13382c8e708fd9eb15dbc81cedc35e6670090c.tar.gz
gdb-0a13382c8e708fd9eb15dbc81cedc35e6670090c.tar.bz2
Fix problems in the sim sources discovered by running the cppcheck static analysis tool.
erc32 PR 18273 * sis.c (main): Remove unreachable code. m68hc11 * gencode.c (gen_fetch_operands): Remove unreachable code. ppc * hw_htab.c (htab_map_binary): Fix overlap check. common * sim-fpu.c (INLINE_SIM_FPU): Fix static analysis warning by increasing parenthesis around casts to signed values.
Diffstat (limited to 'sim/common/sim-fpu.c')
-rw-r--r--sim/common/sim-fpu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sim/common/sim-fpu.c b/sim/common/sim-fpu.c
index f3e7f96..b6d35d1 100644
--- a/sim/common/sim-fpu.c
+++ b/sim/common/sim-fpu.c
@@ -1107,7 +1107,7 @@ sim_fpu_add (sim_fpu *f,
/* sign? */
f->class = sim_fpu_class_number;
- if ((signed64) f->fraction >= 0)
+ if (((signed64) f->fraction) >= 0)
f->sign = 0;
else
{
@@ -1261,7 +1261,7 @@ sim_fpu_sub (sim_fpu *f,
/* sign? */
f->class = sim_fpu_class_number;
- if ((signed64) f->fraction >= 0)
+ if (((signed64) f->fraction) >= 0)
f->sign = 0;
else
{