]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix a gcc 11.2.0 warning
authorMatt Caswell <matt@openssl.org>
Fri, 22 Oct 2021 09:17:14 +0000 (10:17 +0100)
committerMatt Caswell <matt@openssl.org>
Wed, 27 Oct 2021 11:24:31 +0000 (12:24 +0100)
gcc 11.2.0 is the default on Ubuntu 21.10. It emits a (spurious) warning
when compiling test/packettest.c, which causes --strict-warnings builds
to fail. A simple fix avoids the warning.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/16887)

(cherry picked from commit 37467b2752f75ce80437120f704452982b7c1998)

test/packettest.c

index 6c82d04414c3d22f3dd395ab3e9d4ad947701c44..83168c0261775a60b18c601e257d6118371b6555 100644 (file)
@@ -302,7 +302,7 @@ static int test_PACKET_forward(void)
 
 static int test_PACKET_buf_init(void)
 {
-    unsigned char buf1[BUF_LEN];
+    unsigned char buf1[BUF_LEN] = { 0 };
     PACKET pkt;
 
     /* Also tests PACKET_remaining() */