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.
This commit is contained in:
Nick Clifton 2015-04-29 16:02:02 +01:00
parent 998d2a3ef3
commit 0a13382c8e
8 changed files with 29 additions and 6 deletions

View file

@ -1466,6 +1466,8 @@ gen_fetch_operands (FILE *fp, int col,
vars[cur_var], operand_size, operand_size);
operands += 1;
}
#if 0 /* This code is never executed (see strncmp above), but it has not been
removed because it may be that there is a typo in strncmp test below. */
else if (strncmp (operands, "]", 1) == 0)
{
current_insn_size += 1;
@ -1473,6 +1475,7 @@ gen_fetch_operands (FILE *fp, int col,
vars[cur_var], operand_size, operand_size);
operands += 1;
}
#endif
else
{
fatal_error (opcode, "Unknown operand");