From: Rich Salz Date: Sun, 31 Jan 2016 00:48:09 +0000 (-0500) Subject: GH102: Extra volatile avoids GCC bug X-Git-Tag: OpenSSL_1_1_0-pre3~350 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=769adcfe8b27d696d3e221427d82f365919917a8;p=oweals%2Fopenssl.git GH102: Extra volatile avoids GCC bug Reviewed-by: Kurt Roeckx --- diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c index 9473799a48..d31734068b 100644 --- a/crypto/cryptlib.c +++ b/crypto/cryptlib.c @@ -465,7 +465,9 @@ void OpenSSLDie(const char *file, int line, const char *assertion) #endif } -int CRYPTO_memcmp(const volatile void *in_a, const volatile void *in_b, size_t len) +int CRYPTO_memcmp(const volatile void * volatile in_a, + const volatile void * volatile in_b, + size_t len) { size_t i; const volatile unsigned char *a = in_a; diff --git a/include/openssl/crypto.h b/include/openssl/crypto.h index 024f2c9b72..1251aa13d9 100644 --- a/include/openssl/crypto.h +++ b/include/openssl/crypto.h @@ -542,7 +542,9 @@ int OPENSSL_gmtime_diff(int *pday, int *psec, * into a defined order as the return value when a != b is undefined, other * than to be non-zero. */ -int CRYPTO_memcmp(const volatile void *a, const volatile void *b, size_t len); +int CRYPTO_memcmp(const volatile void * volatile in_a, + const volatile void * volatile in_b, + size_t len); /* BEGIN ERROR CODES */ /*