summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorNicolas Iooss <nicolas.iooss_linux@m4x.org>2015-04-16 12:44:02 -0700
committerZefan Li <lizefan@huawei.com>2015-09-18 09:20:31 +0800
commit241cb82322f19f3194946cddfbb4a21c43f04e1b (patch)
tree68e875776874517eb44e4aa7bd044d226466a10a /firmware
parentb7cecd38cf317ef27a698a2c5ab876f9f01ca290 (diff)
firmware/ihex2fw.c: restore missing default in switch statement
commit d43698e8abb58a6ac47d16e0f47bb55f452e4fc4 upstream. Commit 2473238eac95 ("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: 2473238eac95 ("ihex: add support for CS:IP/EIP records") Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Zefan Li <lizefan@huawei.com>
Diffstat (limited to 'firmware')
-rw-r--r--firmware/ihex2fw.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/firmware/ihex2fw.c b/firmware/ihex2fw.c
index cf38e159131a..08d90e25abf0 100644
--- a/firmware/ihex2fw.c
+++ b/firmware/ihex2fw.c
@@ -86,6 +86,7 @@ int main(int argc, char **argv)
case 'j':
include_jump = 1;
break;
+ default:
return usage();
}
}