]> git.ipfire.org Git - thirdparty/openssl.git/commit
fix vs2019 warning
authorGerd Hoffmann <kraxel@redhat.com>
Mon, 15 Jul 2024 15:22:01 +0000 (17:22 +0200)
committerTomas Mraz <tomas@openssl.org>
Thu, 18 Jul 2024 14:13:41 +0000 (16:13 +0200)
commitd7af3f7aa7c0d311c472e65b00928771192e6a06
tree889126be35a09904e7b05e9a791f493c13d77ef6
parent7e7c41dff6b26324a15f180fb4a3d0c7d221e577
fix vs2019 warning

windows vs2019 throws warnings when compiling openssl for edk2:

ERROR - Compiler #2220 from [2024-07-15 13:43:34] [build-stdout] d:\a\edk2\edk2\CryptoPkg\Library\OpensslLib\openssl\ssl\statem\statem_clnt.c(1895) : the following warning is treated as an error
WARNING - Compiler #4701 from [2024-07-15 13:43:34] [build-stdout] d:\a\edk2\edk2\CryptoPkg\Library\OpensslLib\openssl\ssl\statem\statem_clnt.c(1895) : potentially uninitialized local variable 'peer_rpk' used
WARNING - Compiler #4703 from [2024-07-15 13:43:34] [build-stdout] d:\a\edk2\edk2\CryptoPkg\Library\OpensslLib\openssl\ssl\statem\statem_clnt.c(1895) : potentially uninitialized local pointer variable 'peer_rpk' used

Explicitly initialize the peer_rpk variable to make the compiler happy.

Yes, it's a false positive, but you have to check the tls_process_rpk()
body in another source file to see that, which apparently is beyond the
compiler's capabilities.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24895)
ssl/statem/statem_clnt.c