]> git.baikalelectronics.ru Git - kernel.git/commit
firmware/ihex2fw.c: restore missing default in switch statement
authorNicolas Iooss <nicolas.iooss_linux@m4x.org>
Thu, 16 Apr 2015 19:44:02 +0000 (12:44 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 17 Apr 2015 13:03:56 +0000 (09:03 -0400)
commit79f584ed7fe76e8cf48c1ac6f8455b3ca7de61ad
tree1fbc2c16c55a0b427b71f974a568823fa805e409
parent6ceea3a20554253c139f87e7710b7c2bbe5edd2a
firmware/ihex2fw.c: restore missing default in switch statement

Commit 2b5343df5692 ("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: 2b5343df5692 ("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>
firmware/ihex2fw.c