mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-05 19:35:48 +03:00
Fix gcc warnings when -Wredundant-decls set
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
@@ -23,6 +23,10 @@
|
|||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wredundant-decls"
|
||||||
|
#endif
|
||||||
|
|
||||||
/** Constant-time buffer comparison without branches.
|
/** Constant-time buffer comparison without branches.
|
||||||
*
|
*
|
||||||
@@ -43,4 +47,8 @@ int mbedtls_ct_memcmp(const void *a,
|
|||||||
const void *b,
|
const void *b,
|
||||||
size_t n);
|
size_t n);
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* MBEDTLS_CONSTANT_TIME_H */
|
#endif /* MBEDTLS_CONSTANT_TIME_H */
|
||||||
|
@@ -92,9 +92,16 @@ typedef int32_t mbedtls_ct_int_t;
|
|||||||
|
|
||||||
/* constant_time_impl.h contains all the static inline implementations,
|
/* constant_time_impl.h contains all the static inline implementations,
|
||||||
* so that constant_time_internal.h is more readable.
|
* so that constant_time_internal.h is more readable.
|
||||||
|
*
|
||||||
|
* gcc generates warnings about duplicate declarations, so disable this
|
||||||
|
* warning.
|
||||||
*/
|
*/
|
||||||
#include "constant_time_impl.h"
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wredundant-decls"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "constant_time_impl.h"
|
||||||
|
|
||||||
/* ============================================================================
|
/* ============================================================================
|
||||||
* Boolean operations
|
* Boolean operations
|
||||||
@@ -473,4 +480,8 @@ int mbedtls_ct_memcmp(const void *a,
|
|||||||
const void *b,
|
const void *b,
|
||||||
size_t n);
|
size_t n);
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* MBEDTLS_CONSTANT_TIME_INTERNAL_H */
|
#endif /* MBEDTLS_CONSTANT_TIME_INTERNAL_H */
|
||||||
|
Reference in New Issue
Block a user