]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
Workaround for assert_maybe to not trigger clang analyzer warnings.
authorNiels Möller <nisse@lysator.liu.se>
Tue, 14 Nov 2023 20:08:38 +0000 (21:08 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Tue, 14 Nov 2023 20:08:38 +0000 (21:08 +0100)
ecc-internal.h

index 17c51c31caa51519833368058ce9584b8941fcfe..4323304311dc0cd8edcbb4776537ae3d70e7aa58 100644 (file)
 /* 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;