mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-07 13:22:46 +00:00
Avoid error from old gcc version
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
parent
5f6060a1f3
commit
fe55320b5c
@ -128,8 +128,9 @@ void mbedtls_platform_zeroize(void *buf, size_t len)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__)
|
||||||
/* For clang and gcc, pretend that we have some assembly that reads the
|
/* For clang and recent gcc, pretend that we have some assembly that reads the
|
||||||
* zero'd memory as an additional protection against being optimised away. */
|
* zero'd memory as an additional protection against being optimised away. */
|
||||||
|
#if defined(__clang__) || (__GNUC__ >= 10)
|
||||||
#if defined(__clang__)
|
#if defined(__clang__)
|
||||||
#pragma clang diagnostic push
|
#pragma clang diagnostic push
|
||||||
#pragma clang diagnostic ignored "-Wvla"
|
#pragma clang diagnostic ignored "-Wvla"
|
||||||
@ -143,6 +144,7 @@ void mbedtls_platform_zeroize(void *buf, size_t len)
|
|||||||
#elif defined(MBEDTLS_COMPILER_IS_GCC)
|
#elif defined(MBEDTLS_COMPILER_IS_GCC)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user