]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix typing on call to interlockedExchange for windows
authorNeil Horman <nhorman@openssl.org>
Fri, 26 Jul 2024 17:09:06 +0000 (13:09 -0400)
committerNeil Horman <nhorman@openssl.org>
Sun, 11 Aug 2024 12:23:19 +0000 (08:23 -0400)
commita46abbd66eecdbfba84c81eca8911f5d9564c8a8
treedc832e1a4a12c3dee104fa839995cd0f2f8a282e
parentd7b659e18510771450b7e4794313902815f9e206
Fix typing on call to interlockedExchange for windows

mingw is complaining on builds about the use of InterlockedExchange on a
uint32_t type, as the input parameter here is expected to be LONG
(defined as signed 32 bit on all versions of windows).

the input value (reader_idx) will never grow larger than the group size
of the lock (nominally 2, but always a reasonably small value), so it
should be safe to just cast it to the appropriate type here.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/25015)
crypto/threads_win.c