From: Niels Möller Date: Tue, 14 Nov 2023 20:08:38 +0000 (+0100) Subject: Workaround for assert_maybe to not trigger clang analyzer warnings. X-Git-Tag: nettle_3.10rc1~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78699da799fd79eb6cda83c581c7e4651e0d8c19;p=thirdparty%2Fnettle.git Workaround for assert_maybe to not trigger clang analyzer warnings. --- diff --git a/ecc-internal.h b/ecc-internal.h index 17c51c31..43233043 100644 --- a/ecc-internal.h +++ b/ecc-internal.h @@ -88,9 +88,11 @@ /* For asserts that are incompatible with sc tests. Currently used only by ECC code. */ #if WITH_EXTRA_ASSERTS -#define assert_maybe(x) assert(x) +# define assert_maybe(x) assert(x) +#elif defined(__clang_analyzer__) +# define assert_maybe(x) ((void)(x)) #else -#define assert_maybe(x) +# define assert_maybe(x) #endif extern const struct ecc_curve _nettle_secp_192r1;