Remove GCC redundant-decls workaround for mbedtls_ct_memcmp
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
diff --git a/include/mbedtls/constant_time.h b/include/mbedtls/constant_time.h
index 2d33adc..01d5d9d 100644
--- a/include/mbedtls/constant_time.h
+++ b/include/mbedtls/constant_time.h
@@ -23,11 +23,6 @@
#include <stddef.h>
-#ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wredundant-decls"
-#endif
-
/** Constant-time buffer comparison without branches.
*
* This is equivalent to the standard memcmp function, but is likely to be
@@ -47,8 +42,4 @@
const void *b,
size_t n);
-#ifdef __GNUC__
- #pragma GCC diagnostic pop
-#endif
-
#endif /* MBEDTLS_CONSTANT_TIME_H */
diff --git a/library/constant_time_internal.h b/library/constant_time_internal.h
index 5879e47..1411e14 100644
--- a/library/constant_time_internal.h
+++ b/library/constant_time_internal.h
@@ -476,10 +476,12 @@
size_t offset_max,
size_t len);
-/* Documented in include/mbedtls/constant_time.h. a and b are secret. */
-int mbedtls_ct_memcmp(const void *a,
- const void *b,
- size_t n);
+/* Documented in include/mbedtls/constant_time.h. a and b are secret.
+
+ int mbedtls_ct_memcmp(const void *a,
+ const void *b,
+ size_t n);
+ */
#ifdef __GNUC__
#pragma GCC diagnostic pop