ruby-changes:37520
From: nobu <ko1@a...>
Date: Sun, 15 Feb 2015 12:23:45 +0900 (JST)
Subject: [ruby-changes:37520] nobu:r49601 (trunk): random.c: suppress a warning
nobu 2015-02-15 12:23:36 +0900 (Sun, 15 Feb 2015) New Revision: 49601 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49601 Log: 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. Modified files: trunk/random.c Index: random.c =================================================================== --- random.c (revision 49600) +++ random.c (revision 49601) @@ -485,7 +485,7 @@ fill_random_bytes(void *seed, size_t siz https://github.com/ruby/ruby/blob/trunk/random.c#L485 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; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/