From 3b7ef512f190a506f62af53536b586b4800f66c1 Mon Sep 17 00:00:00 2001 From: Mohsin Kazmi Date: Mon, 10 Jan 2022 15:32:35 +0000 Subject: misc: fix the uninitialization error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Type: fix | src/vppinfra/vector/toeplitz.c:69:9: error: ‘kv’ may be used uninitialized in this function [-Werror=maybe-uninitialized] | src/vppinfra/memcpy_x86_64.h:45:17: error: ‘*((void *)&key+16)’ may be used uninitialized in this function [-Werror=maybe-uninitialized] | *(u8x16u *) d = *(u8x16u *) s; | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ | src/vnet/gre/interface.c:356:20: note: ‘*((void *)&key+16)’ was declared here Signed-off-by: Mohsin Kazmi Change-Id: I71614da2821ebda5200a0cb9437a7aad0c42fbb2 --- src/vnet/gre/interface.c | 2 +- src/vppinfra/vector/toeplitz.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vnet/gre/interface.c b/src/vnet/gre/interface.c index 4a02aa77292..bc78c605068 100644 --- a/src/vnet/gre/interface.c +++ b/src/vnet/gre/interface.c @@ -353,7 +353,7 @@ static walk_rc_t gre_tunnel_add_teib_walk (index_t nei, void *ctx) { gre_tunnel_t *t = ctx; - gre_tunnel_key_t key; + gre_tunnel_key_t key = {}; gre_teib_mk_key (t, teib_entry_get (nei), &key); gre_tunnel_db_add (t, &key); diff --git a/src/vppinfra/vector/toeplitz.c b/src/vppinfra/vector/toeplitz.c index b0140d51e6f..fcc4b64ad19 100644 --- a/src/vppinfra/vector/toeplitz.c +++ b/src/vppinfra/vector/toeplitz.c @@ -66,7 +66,7 @@ void clib_toeplitz_hash_key_expand (u64 *matrixes, u8 *key, int size) { u64x8u *m = (u64x8u *) matrixes; - u64x2 kv, zero = {}; + u64x2 kv = {}, zero = {}; while (size >= 8) { -- cgit 1.2.3-korg