From 78699da799fd79eb6cda83c581c7e4651e0d8c19 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se>
Date: Tue, 14 Nov 2023 21:08:38 +0100
Subject: [PATCH] Workaround for assert_maybe to not trigger clang analyzer
 warnings.

---
 ecc-internal.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

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;
-- 
GitLab