Skip to content

Commit 54974c9

Browse files
committed
autoconf: Add some warning flags for clang 13 or newer
-Wnull-pointer-subtraction -Wunused-but-set-parameter -Wunused-but-set-variable
1 parent 80aedf3 commit 54974c9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

aclocal.m4

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,7 @@ AC_DEFUN(AC_LBL_DEVEL,
809809
AC_LBL_CHECK_COMPILER_OPT($1, -Wcast-qual)
810810
AC_LBL_CHECK_COMPILER_OPT($1, -Wmissing-prototypes)
811811
AC_LBL_CHECK_COMPILER_OPT($1, -Wmissing-variable-declarations)
812+
AC_LBL_CHECK_COMPILER_OPT($1, -Wnull-pointer-subtraction)
812813
AC_LBL_CHECK_COMPILER_OPT($1, -Wold-style-definition)
813814
AC_LBL_CHECK_COMPILER_OPT($1, -Wpedantic)
814815
AC_LBL_CHECK_COMPILER_OPT($1, -Wpointer-arith)
@@ -817,6 +818,8 @@ AC_DEFUN(AC_LBL_DEVEL,
817818
AC_LBL_CHECK_COMPILER_OPT($1, -Wsign-compare)
818819
AC_LBL_CHECK_COMPILER_OPT($1, -Wstrict-prototypes)
819820
AC_LBL_CHECK_COMPILER_OPT($1, -Wunreachable-code-return)
821+
AC_LBL_CHECK_COMPILER_OPT($1, -Wunused-but-set-parameter)
822+
AC_LBL_CHECK_COMPILER_OPT($1, -Wunused-but-set-variable)
820823
AC_LBL_CHECK_COMPILER_OPT($1, -Wused-but-marked-unused)
821824
AC_LBL_CHECK_COMPILER_OPT($1, -Wwrite-strings)
822825
fi

0 commit comments

Comments
 (0)