summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2022-01-10 15:32:35 +0000
committerDamjan Marion <dmarion@me.com>2022-01-11 11:32:34 +0000
commit3b7ef512f190a506f62af53536b586b4800f66c1 (patch)
treebd6af34a0aa011d7704e9c3ffeb8de27ac1ed72d
parent6ac74e44e545b7003b3a7da62b35b6adffb6ccdc (diff)
misc: fix the uninitialization error
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 <sykazmi@cisco.com> Change-Id: I71614da2821ebda5200a0cb9437a7aad0c42fbb2
-rw-r--r--src/vnet/gre/interface.c2
-rw-r--r--src/vppinfra/vector/toeplitz.c2
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)
{