Commit 11efded2 authored by Nicolas Iooss's avatar Nicolas Iooss Committed by Ben Hutchings

firmware/ihex2fw.c: restore missing default in switch statement

commit d43698e8 upstream.

Commit 2473238e ("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: 2473238e ("ihex: add support for CS:IP/EIP records")
Signed-off-by: default avatarNicolas Iooss <nicolas.iooss_linux@m4x.org>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent de49525a
...@@ -86,6 +86,7 @@ int main(int argc, char **argv) ...@@ -86,6 +86,7 @@ int main(int argc, char **argv)
case 'j': case 'j':
include_jump = 1; include_jump = 1;
break; break;
default:
return usage(); return usage();
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment