diff --git a/ecc-internal.h b/ecc-internal.h
index 17c51c31caa51519833368058ce9584b8941fcfe..4323304311dc0cd8edcbb4776537ae3d70e7aa58 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;