diff options
author | Nick Clifton <nickc@redhat.com> | 2015-04-29 16:02:02 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2015-04-29 16:02:02 +0100 |
commit | 0a13382c8e708fd9eb15dbc81cedc35e6670090c (patch) | |
tree | 9fd21d2d6d7d18ce08e5c4d1f74cf91f57fb631a /sim/common | |
parent | 998d2a3ef31378d3d980972dc68f4926b720a7e9 (diff) | |
download | gdb-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')
-rw-r--r-- | sim/common/ChangeLog | 7 | ||||
-rw-r--r-- | sim/common/sim-fpu.c | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 3c4428f..ebf8618 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,10 @@ +2015-04-29 Nick Clifton <nickc@redhat.com> + + PR 18273 + * sim-fpu.c (INLINE_SIM_FPU): Fix static analysis warning by + increasing parenthesis around casts to signed values. + + 2015-04-21 Mike Frysinger <vapier@gentoo.org> * gennltvals.sh: Add mcore support. 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 { |