Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Smith <brian@briansmith.org>2016-01-27 03:29:55 +0300
committerDavid Benjamin <davidben@google.com>2016-01-28 01:06:11 +0300
commitf5f4be8fac9ba7dd6766bb72a629bfed5d480021 (patch)
tree472f754062c03444ad4bb5820ce3a275d317144b /crypto/internal.h
parent54a8d7c14f321d7a8faeab64873ac45c588da3eb (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.h2
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;