Tidy-up: move GCC warning fix to constant_time_impl.h

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
diff --git a/library/constant_time_impl.h b/library/constant_time_impl.h
index 8570928..1fa655d 100644
--- a/library/constant_time_impl.h
+++ b/library/constant_time_impl.h
@@ -37,6 +37,17 @@
 #include "mbedtls/bignum.h"
 #endif
 
+/* constant_time_impl.h contains all the static inline implementations,
+ * so that constant_time_internal.h is more readable.
+ *
+ * gcc generates warnings about duplicate declarations, so disable this
+ * warning.
+ */
+#ifdef __GNUC__
+    #pragma GCC diagnostic push
+    #pragma GCC diagnostic ignored "-Wredundant-decls"
+#endif
+
 /* Disable asm under Memsan because it confuses Memsan and generates false errors */
 #if defined(MBEDTLS_TEST_CONSTANT_FLOW_MEMSAN)
 #define MBEDTLS_CT_NO_ASM
@@ -288,4 +299,8 @@
     return (mbedtls_ct_condition_t) (~x);
 }
 
+#ifdef __GNUC__
+    #pragma GCC diagnostic pop
+#endif
+
 #endif /* MBEDTLS_CONSTANT_TIME_IMPL_H */