We can't enable -Wstringop-overread because it has bogus diagnostics
with legitimate strncat(3) calls.
We can't enable -Wstringop-truncation because it has bogus diagnostics
with legitimate strncpy(3) calls.
Link: <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123024>
Reviewed-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
CFLAGS="$CFLAGS -Werror=int-conversion"
CFLAGS="$CFLAGS -Werror=overflow"
CFLAGS="$CFLAGS -Werror=sizeof-pointer-div"
+CFLAGS="$CFLAGS -Werror=stringop-overflow=4"
CFLAGS="$CFLAGS -Werror=unused-but-set-parameter"
CFLAGS="$CFLAGS -Werror=unused-function"
CFLAGS="$CFLAGS -Werror=unused-label"