diff options
author | Brian Smith <brian@briansmith.org> | 2016-01-27 03:29:55 +0300 |
---|---|---|
committer | David Benjamin <davidben@google.com> | 2016-01-28 01:06:11 +0300 |
commit | f5f4be8fac9ba7dd6766bb72a629bfed5d480021 (patch) | |
tree | 472f754062c03444ad4bb5820ce3a275d317144b /crypto/internal.h | |
parent | 54a8d7c14f321d7a8faeab64873ac45c588da3eb (diff) |
Fix pointer-to-non-volatile cast in thread_win.c.
Casting a pointer-to-non-volatile to pointer-to-volatile can be a no-op
as the compiler only requires volatile semantics when the pointed-to
object is a volatile object and there are no pointers-to-non-volatile
involved. This probably doesn't matter unless building with the MSVC
-volatile:iso flag, and maybe not even then, but it is good practice
anyway.
Change-Id: I94900d3dc61de3b8ce2ddecab2811907a9a7adbf
Reviewed-on: https://boringssl-review.googlesource.com/6973
Reviewed-by: David Benjamin <davidben@google.com>
Diffstat (limited to 'crypto/internal.h')
-rw-r--r-- | crypto/internal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/internal.h b/crypto/internal.h index fe4ed731..5574aab2 100644 --- a/crypto/internal.h +++ b/crypto/internal.h @@ -334,7 +334,7 @@ static inline int constant_time_select_int(unsigned int mask, int a, int b) { typedef uint32_t CRYPTO_once_t; #define CRYPTO_ONCE_INIT 0 #elif defined(OPENSSL_WINDOWS) -typedef LONG CRYPTO_once_t; +typedef volatile LONG CRYPTO_once_t; #define CRYPTO_ONCE_INIT 0 #else typedef pthread_once_t CRYPTO_once_t; |