Prevent possible compiler optimizations
This commit is contained in:
parent
869f3e09c9
commit
db1dd21762
@ -124,8 +124,8 @@ sodium_memcmp(const void *const b1_, const void *const b2_, size_t len)
|
|||||||
const volatile unsigned char *volatile b2 =
|
const volatile unsigned char *volatile b2 =
|
||||||
(const volatile unsigned char *volatile) b2_;
|
(const volatile unsigned char *volatile) b2_;
|
||||||
#endif
|
#endif
|
||||||
size_t i;
|
size_t i;
|
||||||
unsigned char d = (unsigned char) 0U;
|
volatile unsigned char d = (unsigned char) 0U;
|
||||||
|
|
||||||
#if HAVE_WEAK_SYMBOLS
|
#if HAVE_WEAK_SYMBOLS
|
||||||
_sodium_dummy_symbol_to_prevent_memcmp_lto(b1, b2, len);
|
_sodium_dummy_symbol_to_prevent_memcmp_lto(b1, b2, len);
|
||||||
|
Loading…
Reference in New Issue
Block a user