summaryrefslogtreecommitdiff
path: root/random.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-15 03:23:36 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-15 03:23:36 (GMT)
commit3bc9d1d0f4131db2b7df226de0494e76b0aa3441 (patch)
treed558d386d12c2e9d3f58ef1925fa3b745e024653 /random.c
parent10a9807030020432e92008615dde14fc657b17ff (diff)
random.c: suppress a warning
* random.c (fill_random_bytes): use ATOMIC_SIZE_CAS to suppress a strict-aliasing warning by gcc 4.9 for mingw. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'random.c')
-rw-r--r--random.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/random.c b/random.c
index 4734cf7..82111ce 100644
--- a/random.c
+++ b/random.c
@@ -485,7 +485,7 @@ fill_random_bytes(void *seed, size_t size)
if (!CryptAcquireContext(&prov, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) {
prov = (HCRYPTPROV)INVALID_HANDLE_VALUE;
}
- old_prov = (HCRYPTPROV)ATOMIC_PTR_CAS(perm_prov, 0, prov);
+ old_prov = (HCRYPTPROV)ATOMIC_SIZE_CAS(perm_prov, 0, prov);
if (prov == (HCRYPTPROV)INVALID_HANDLE_VALUE) {
if (old_prov) prov = old_prov;
}