aboutsummaryrefslogtreecommitdiff
path: root/sim/erc32
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/erc32
parent998d2a3ef31378d3d980972dc68f4926b720a7e9 (diff)
downloadfsf-binutils-gdb-0a13382c8e708fd9eb15dbc81cedc35e6670090c.zip
fsf-binutils-gdb-0a13382c8e708fd9eb15dbc81cedc35e6670090c.tar.gz
fsf-binutils-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/erc32')
-rw-r--r--sim/erc32/ChangeLog5
-rw-r--r--sim/erc32/sis.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/sim/erc32/ChangeLog b/sim/erc32/ChangeLog
index 4f9b502..688dc64 100644
--- a/sim/erc32/ChangeLog
+++ b/sim/erc32/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-29 Nick Clifton <nickc@redhat.com>
+
+ PR 18273
+ * sis.c (main): Remove unreachable code.
+
2015-04-24 David Binderman <dcb314@hotmail.com>
Nick Clifton <nickc@redhat.com>
diff --git a/sim/erc32/sis.c b/sim/erc32/sis.c
index 92880e1..180d97e 100644
--- a/sim/erc32/sis.c
+++ b/sim/erc32/sis.c
@@ -169,7 +169,7 @@ main(argc, argv)
while (stat < argc) {
if (argv[stat][0] == '-') {
if (strcmp(argv[stat], "-v") == 0) {
- sis_verbose = 1;
+ sis_verbose += 1;
} else if (strcmp(argv[stat], "-c") == 0) {
if ((stat + 1) < argc) {
copt = 1;
@@ -202,8 +202,6 @@ main(argc, argv)
#endif
} else if (strcmp(argv[stat], "-dumbio") == 0) {
dumbio = 1;
- } else if (strcmp(argv[stat], "-v") == 0) {
- sis_verbose += 1;
} else {
printf("unknown option %s\n", argv[stat]);
usage();