]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
compiler: -Werror=shift-count-overflow hardening
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 5 Feb 2019 22:47:31 +0000 (23:47 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 5 Feb 2019 22:47:31 +0000 (23:47 +0100)
Warn if shift count >= width of type.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
configure.ac

index 761ad0ac810083450ceb2fa40f52ba348a1e16fa..729f262c0d9a35677a290a80dc7c94a87b353fa5 100644 (file)
@@ -715,6 +715,7 @@ AX_CHECK_COMPILE_FLAG([-Wshadow], [CFLAGS="$CFLAGS -Wshadow"],,[-Werror])
 AX_CHECK_COMPILE_FLAG([-Wendif-labels], [CFLAGS="$CFLAGS -Wendif-labels"],,[-Werror])
 AX_CHECK_COMPILE_FLAG([-Werror=overflow], [CFLAGS="$CFLAGS -Werror=overflow"],,[-Werror])
 AX_CHECK_COMPILE_FLAG([-fdiagnostics-show-option], [CFLAGS="$CFLAGS -fdiagnostics-show-option"],,[-Werror])
+AX_CHECK_COMPILE_FLAG([-Werror=shift-count-overflow], [CFLAGS="$CFLAGS -Werror=shift-count-overflow"],,[-Werror])
 
 AX_CHECK_LINK_FLAG([-z relro], [LDLAGS="$LDLAGS -z relro"],,[])
 AX_CHECK_LINK_FLAG([-z now], [LDLAGS="$LDLAGS -z now"],,[])