]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
document clang 16+ suppressions
authorAlan T. DeKok <aland@freeradius.org>
Sun, 19 Nov 2023 22:47:28 +0000 (17:47 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 19 Nov 2023 22:47:28 +0000 (17:47 -0500)
-Wunsafe-buffer-usage is useless for C code, as it complains
about essentially every use of pointers.

-Wcast-function-type-strict complains about casting functions
which take (void*) to functions which take a typed pointer.  This
pattern is used extensively in the dlist wrappers.

-Wreserved-identifier complains about identifiers which begin
with "_".  This is used all over the place in our code, but is
generally forbidden in C.

-Wc2x-extensions complains about initializers like "foo = {}"
which is fine, but which isn't C99.

-Wextra-semi-stmt complains about ";;" at the end of lines.
Our code is clean, but some system header files are crap.

Make.inc.in

index 2f58eb71653b7401c5c6d539a3e75841d7d82a8d..a85de88750a294d4d782dee81bc848e4e7623749 100644 (file)
@@ -90,6 +90,11 @@ INSTALL_DATA = ${INSTALL} -m 644
 INSTALL_SCRIPT = ${INSTALL_PROGRAM}
 INSTALLSTRIP   = @INSTALLSTRIP@
 
+#
+#  For clang16+.  Shut up a bunch of C++ complaints which are fine for C.b
+#
+# CFLAGS += -Wno-reserved-identifier -Wno-c2x-extensions -Wno-cast-function-type-strict -Wno-extra-semi-stmt -Wno-unsafe-buffer-usage
+
 #
 #  Linker arguments for libraries searched for by the main
 #  configure script.