From: Alan T. DeKok Date: Sun, 19 Nov 2023 22:47:28 +0000 (-0500) Subject: document clang 16+ suppressions X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c827d4cea331a4aca2c10dcad98384e58b7616bd;p=thirdparty%2Ffreeradius-server.git document clang 16+ suppressions -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. --- diff --git a/Make.inc.in b/Make.inc.in index 2f58eb71653..a85de88750a 100644 --- a/Make.inc.in +++ b/Make.inc.in @@ -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.