From c9662b47be711c00f013ac4606dc86c9a2ad8201 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Sat, 21 Feb 2026 12:05:11 +0100 Subject: ipcpd: Fix unused values in unicast IPCP Use the key in the store operation in the DHT, to avoid static analyzer seeing it as being set without being used in release builds. The length of the packet buffer is only used when tracking DT stats, so should be set within the IPCP_FLOW_STATS guard. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/ipcpd/unicast/dir/dht.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/ipcpd/unicast/dir/dht.c') diff --git a/src/ipcpd/unicast/dir/dht.c b/src/ipcpd/unicast/dir/dht.c index bc8fb820..8eeea800 100644 --- a/src/ipcpd/unicast/dir/dht.c +++ b/src/ipcpd/unicast/dir/dht.c @@ -2798,8 +2798,6 @@ static void do_dht_kv_store(const dht_store_msg_t * store) uint8_t * key; time_t exp; - (void) key; /* Only in logs, not used with DISABLE_TEST_LOGGING */ - assert(store != NULL); val.data = store->val.data; @@ -2807,7 +2805,7 @@ static void do_dht_kv_store(const dht_store_msg_t * store) key = store->key.data; exp = store->exp; - if (dht_kv_store(store->key.data, val, store->exp) < 0) { + if (dht_kv_store(key, val, store->exp) < 0) { log_err(KV_FMT " Failed to store.", KV_VAL(key, val)); return; } -- cgit v1.2.3