Add implicit fall through warning
Requires modification to our comment about fall through to match compilers expectations. Works for GCC and Clang. Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
db102c67ef
commit
86004227d1
3 changed files with 3 additions and 1 deletions
|
@ -462,6 +462,7 @@ if test "x$warningflags" = "xyes" ; then
|
||||||
CFLAGS_ADD([-Wformat-nonliteral], [WARNING_CFLAGS])
|
CFLAGS_ADD([-Wformat-nonliteral], [WARNING_CFLAGS])
|
||||||
CFLAGS_ADD([-Wformat-security], [WARNING_CFLAGS])
|
CFLAGS_ADD([-Wformat-security], [WARNING_CFLAGS])
|
||||||
CFLAGS_ADD([-Wignored-qualifiers], [WARNING_CFLAGS])
|
CFLAGS_ADD([-Wignored-qualifiers], [WARNING_CFLAGS])
|
||||||
|
CFLAGS_ADD([-Wimplicit-fallthrough], [WARNING_CFLAGS])
|
||||||
CFLAGS_ADD([-Winit-self], [WARNING_CFLAGS])
|
CFLAGS_ADD([-Winit-self], [WARNING_CFLAGS])
|
||||||
CFLAGS_ADD([-Wlogical-op], [WARNING_CFLAGS])
|
CFLAGS_ADD([-Wlogical-op], [WARNING_CFLAGS])
|
||||||
CFLAGS_ADD([-Wmissing-declarations], [WARNING_CFLAGS])
|
CFLAGS_ADD([-Wmissing-declarations], [WARNING_CFLAGS])
|
||||||
|
|
|
@ -220,6 +220,7 @@ if get_option('buildtype').startswith('debug')
|
||||||
'-Wformat-nonliteral',
|
'-Wformat-nonliteral',
|
||||||
'-Wformat-security',
|
'-Wformat-security',
|
||||||
'-Wignored-qualifiers',
|
'-Wignored-qualifiers',
|
||||||
|
'-Wimplicit-fallthrough',
|
||||||
'-Winit-self',
|
'-Winit-self',
|
||||||
'-Wlogical-op',
|
'-Wlogical-op',
|
||||||
'-Wmissing-declarations',
|
'-Wmissing-declarations',
|
||||||
|
|
|
@ -196,7 +196,7 @@ static void usage(int op, const char * const myname)
|
||||||
addlist(_(" --ignore <pkg> ignore a package upgrade (can be used more than once)\n"));
|
addlist(_(" --ignore <pkg> ignore a package upgrade (can be used more than once)\n"));
|
||||||
addlist(_(" --ignoregroup <grp>\n"
|
addlist(_(" --ignoregroup <grp>\n"
|
||||||
" ignore a group upgrade (can be used more than once)\n"));
|
" ignore a group upgrade (can be used more than once)\n"));
|
||||||
/* pass through */
|
/* fall through */
|
||||||
case PM_OP_REMOVE:
|
case PM_OP_REMOVE:
|
||||||
addlist(_(" -d, --nodeps skip dependency version checks (-dd to skip all checks)\n"));
|
addlist(_(" -d, --nodeps skip dependency version checks (-dd to skip all checks)\n"));
|
||||||
addlist(_(" --assume-installed <package=version>\n"
|
addlist(_(" --assume-installed <package=version>\n"
|
||||||
|
|
Loading…
Add table
Reference in a new issue