aboutsummaryrefslogtreecommitdiff
path: root/sim/ppc
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/ppc
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/ppc')
-rw-r--r--sim/ppc/ChangeLog5
-rw-r--r--sim/ppc/hw_htab.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index cd185ba..1297df1 100644
--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-29 Nick Clifton <nickc@redhat.com>
+
+ PR 18273
+ * hw_htab.c (htab_map_binary): Fix overlap check.
+
2015-04-13 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (version.o): Change to using create-version.sh from gdb.
diff --git a/sim/ppc/hw_htab.c b/sim/ppc/hw_htab.c
index c49b323..cf275ff 100644
--- a/sim/ppc/hw_htab.c
+++ b/sim/ppc/hw_htab.c
@@ -549,7 +549,7 @@ htab_map_binary(device *me,
if ((sizes.text_base <= sizes.data_base
&& sizes.text_bound >= sizes.data_bound)
|| (sizes.data_base <= sizes.text_base
- && sizes.data_bound >= sizes.data_bound)
+ && sizes.data_bound >= sizes.text_bound)
|| (sizes.text_bound > sizes.data_base
&& sizes.text_bound <= sizes.data_bound)
|| (sizes.text_base >= sizes.data_base