From 193d39d9b78a9e3c0c257b2e1e9f9dd4a7a13349 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 15 May 2026 20:53:25 +0200 Subject: Misc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- common.h | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'common.h') diff --git a/common.h b/common.h index 717f43b..116ec17 100644 --- a/common.h +++ b/common.h @@ -1,4 +1,19 @@ /* See LICENSE file for copyright and license details. */ +#if defined(__clang__) +# pragma clang diagnostic ignored "-Wunsafe-buffer-usage" /* completely broken */ +# pragma clang diagnostic ignored "-Wpadded" /* don't care */ +# pragma clang diagnostic ignored "-Wdisabled-macro-expansion" /* glibc issue */ +# pragma clang diagnostic ignored "-Wc11-extensions" /* glibc issue */ +# pragma clang diagnostic ignored "-Wpre-c11-compat" /* glibc issue */ +# pragma clang diagnostic ignored "-Wunknown-warning-option" /* ignoring -Wsuggest-attribute=const|pure */ +# pragma clang diagnostic ignored "-Wimplicit-void-ptr-cast" /* C++ warning, and we are in internal files */ +# pragma clang diagnostic ignored "-Wc++-keyword" /* C++ warning, and we are in internal files */ +# pragma clang diagnostic ignored "-Wc++-unterminated-string-initialization" /* Stupid C++ warning, and we are in internal files */ +#endif +#if defined(__GNUC__) +# pragma GCC diagnostic ignored "-Winline" +#endif + #include "librecrypt.h" #if defined(__linux__) # include @@ -15,20 +30,6 @@ #include -#if defined(__clang__) -# pragma clang diagnostic ignored "-Wunsafe-buffer-usage" /* completely broken */ -# pragma clang diagnostic ignored "-Wpadded" /* don't care */ -# pragma clang diagnostic ignored "-Wdisabled-macro-expansion" /* glibc issue */ -# pragma clang diagnostic ignored "-Wc11-extensions" /* glibc issue */ -# pragma clang diagnostic ignored "-Wunknown-warning-option" /* ignoring -Wsuggest-attribute=const|pure */ -# pragma clang diagnostic ignored "-Wimplicit-void-ptr-cast" /* C++ warning, and we are in internal files */ -# pragma clang diagnostic ignored "-Wc++-keyword" /* C++ warning, and we are in internal files */ -#endif -#if defined(__GNUC__) -# pragma GCC diagnostic ignored "-Winline" -#endif - - #if defined(__GNUC__) # define HIDDEN __attribute__((__visibility__("hidden"))) # define CONST __attribute__((__const__)) @@ -40,8 +41,8 @@ #endif #define NONSTRING -#if defined(__GNUC__) && !defined(__clang__) -# if __GNUC__ >= 8 +#if defined(__GNUC__) +# if __GNUC__ >= 8 || defined(__clang__) # undef NONSTRING # define NONSTRING __attribute__((__nonstring__)) # endif -- cgit v1.2.3-70-g09d2