Skip to content

Commit

Permalink
firmware/ihex2fw.c: restore missing default in switch statement
Browse files Browse the repository at this point in the history
Commit 2473238 ("ihex: add support for CS:IP/EIP records") removes
the "default:" statement in the switch block, making the "return
usage();" line dead code and ihex2fw silently ignoring unknown options.
Restore this statement.

This bug was found by building with HOSTCC=clang and adding
-Wunreachable-code-return to HOSTCFLAGS.

Fixes: 2473238 ("ihex: add support for CS:IP/EIP records")
Signed-off-by: Nicolas Iooss <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: David Woodhouse <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
fishilico authored and torvalds committed Apr 17, 2015
1 parent 2afe27c commit d43698e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions firmware/ihex2fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ int main(int argc, char **argv)
case 'j':
include_jump = 1;
break;
default:
return usage();
}
}
Expand Down

0 comments on commit d43698e

Please sign in to comment.