From: Kochise Date: Mon, 16 Mar 2020 19:04:04 +0000 (+0100) Subject: Windows: Add type casting in CRYPTO_atomic_add to remove warning X-Git-Tag: openssl-3.0.0-alpha1~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7da7b27eec58d1efc7012f002c45ddbdd61a5e79;p=thirdparty%2Fopenssl.git Windows: Add type casting in CRYPTO_atomic_add to remove warning CLA: trivial Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/11337) --- diff --git a/crypto/threads_win.c b/crypto/threads_win.c index 43bd0f51d95..4d95cd3fbb3 100644 --- a/crypto/threads_win.c +++ b/crypto/threads_win.c @@ -155,7 +155,7 @@ int CRYPTO_THREAD_compare_id(CRYPTO_THREAD_ID a, CRYPTO_THREAD_ID b) int CRYPTO_atomic_add(int *val, int amount, int *ret, CRYPTO_RWLOCK *lock) { - *ret = InterlockedExchangeAdd(val, amount) + amount; + *ret = (int)InterlockedExchangeAdd((long volatile *)val, (long)amount) + amount; return 1; }