[PATCH v7 07/16] common/cnxk: remove unused variable
Stephen Hemminger
stephen at networkplumber.org
Sat Feb 15 20:04:35 CET 2025
A couple places in this code were generating warnings from
PVS studio about memset potentially being ignored. This is because
the ipv6_buf was declared but never used.
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
drivers/common/cnxk/roc_npc_utils.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/common/cnxk/roc_npc_utils.c b/drivers/common/cnxk/roc_npc_utils.c
index 75d3b0702c..0b32a148e2 100644
--- a/drivers/common/cnxk/roc_npc_utils.c
+++ b/drivers/common/cnxk/roc_npc_utils.c
@@ -454,11 +454,9 @@ npc_process_ipv6_field_hash_legacy(const struct roc_npc_flow_item_ipv6 *ipv6_spe
struct npc_lid_lt_xtract_info *lid_lt_xinfo;
uint8_t hash_field[ROC_IPV6_ADDR_LEN];
struct npc_xtract_info *xinfo;
- struct roc_ipv6_hdr ipv6_buf;
uint32_t hash = 0, mask;
int intf, i, rc = 0;
- memset(&ipv6_buf, 0, sizeof(ipv6_buf));
memset(hash_field, 0, sizeof(hash_field));
intf = pst->nix_intf;
@@ -495,11 +493,9 @@ npc_process_ipv6_field_hash_o20k(const struct roc_npc_flow_item_ipv6 *ipv6_spec,
union npc_kex_ldata_flags_cfg *lid_cfg;
uint8_t hash_field[ROC_IPV6_ADDR_LEN];
struct npc_xtract_info *xinfo;
- struct roc_ipv6_hdr ipv6_buf;
uint32_t hash = 0, mask;
int intf, i, rc = 0;
- memset(&ipv6_buf, 0, sizeof(ipv6_buf));
memset(hash_field, 0, sizeof(hash_field));
intf = pst->nix_intf;
--
2.47.2
More information about the dev
mailing list