From ff31004b982c0627ffe5869747b4de7eed763737 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Tue, 24 Sep 2024 20:22:48 +0200 Subject: [PATCH 1/2] [clang-tidy] disable cppcoreguidelines-macro-usage This check does not help us as: * We need some stringification macros even in C++ * The whole API is C so macros are all over the place --- .clang-tidy | 1 + 1 file changed, 1 insertion(+) diff --git a/.clang-tidy b/.clang-tidy index 10e5d2dfa..4fc7cd99b 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -39,6 +39,7 @@ Checks: > -cppcoreguidelines-avoid-magic-numbers, -cppcoreguidelines-avoid-non-const-global-variables, -cppcoreguidelines-macro-to-enum, + -cppcoreguidelines-macro-usage, -cppcoreguidelines-pro-type-vararg, -cppcoreguidelines-pro-type-reinterpret-cast, -cppcoreguidelines-pro-bounds-pointer-arithmetic, From 5e998bb0788389a28c7a04476c96e5399f939342 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Tue, 24 Sep 2024 20:30:14 +0200 Subject: [PATCH 2/2] [winpr,platfom] fix WINPR_PRAGMA_DIAG_IGNORED_UNUSED_MACRO --- winpr/include/winpr/platform.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/winpr/include/winpr/platform.h b/winpr/include/winpr/platform.h index fa3666f7c..ef3c741b7 100644 --- a/winpr/include/winpr/platform.h +++ b/winpr/include/winpr/platform.h @@ -36,7 +36,7 @@ #define WINPR_PRAGMA_DIAG_IGNORED_RESERVED_ID_MACRO \ _Pragma("clang diagnostic ignored \"-Wreserved-id-macro\"") #define WINPR_PRAGMA_DIAG_IGNORED_UNUSED_MACRO \ - _Pragma("clang diagnostic ignored \"-Wunused-macro\"") + _Pragma("clang diagnostic ignored \"-Wunused-macros\"") #define WINPR_PRAGMA_DIAG_IGNORED_RESERVED_IDENTIFIER \ _Pragma("clang diagnostic ignored \"-Wreserved-identifier\"") #define WINPR_PRAGMA_DIAG_IGNORED_ATOMIC_SEQ_CST \ @@ -65,8 +65,7 @@ _Pragma("GCC diagnostic ignored \"-Wstrict-prototypes\"") #define WINPR_PRAGMA_DIAG_IGNORED_RESERVED_ID_MACRO /* not supported _Pragma("GCC diagnostic \ ignored \"-Wreserved-id-macro\"") */ -#define WINPR_PRAGMA_DIAG_IGNORED_UNUSED_MACRO /* not supported _Pragma("GCC diagnostic ignored \ - \"-Wunused-macro\"") */ +#define WINPR_PRAGMA_DIAG_IGNORED_UNUSED_MACRO _Pragma("GCC diagnostic ignored \"-Wunused-macros\"") #define WINPR_PRAGMA_DIAG_IGNORED_RESERVED_IDENTIFIER /* not supported _Pragma("GCC diagnostic ignored \"-Wreserved-identifier\"") */ #define WINPR_PRAGMA_DIAG_IGNORED_ATOMIC_SEQ_CST /* not supported _Pragma("GCC diagnostic \