]> git.puffer.fish Git - matthieu/frr.git/commitdiff
*: Add -Wswitch-enum to build
authorDonald Sharp <sharpd@nvidia.com>
Mon, 30 Jan 2023 15:12:06 +0000 (10:12 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Tue, 31 Jan 2023 20:15:59 +0000 (15:15 -0500)
The -Wswitch-enum will allow the compiler to warn us
when a developer creates a switch over a enum and is
using `default:` when they should be iterating over
every enum

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
configure.ac

index 48ac4873b86a88b9733e990f8caa45bb5af370c1..e20696a3d90f8ab15754a8bbcb9ec38a1e184cbd 100644 (file)
@@ -351,6 +351,7 @@ AC_C_FLAG([-Wall])
 AC_C_FLAG([-Wextra])
 AC_C_FLAG([-Wformat-nonliteral])
 AC_C_FLAG([-Wformat-security])
+AC_C_FLAG([-Wswitch-enum])
 AC_C_FLAG([-Wstrict-prototypes])
 AC_C_FLAG([-Wmissing-prototypes])
 AC_C_FLAG([-Wmissing-declarations])