From 7eb8895d405b6e5d76259faf524459030c8b8232 Mon Sep 17 00:00:00 2001 From: Emmanuel Roullit Date: Tue, 24 Jan 2017 21:28:35 +0100 Subject: [PATCH] ethdev: remove useless pointer initialization Found with clang static analysis: lib/librte_ether/rte_ethdev.c:2467:22: warning: Value stored to 'dev' during its initialization is never read struct rte_eth_dev *dev = &rte_eth_devices[port_id]; ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 88ac4396ad29 ("ethdev: add VMDq support") Signed-off-by: Emmanuel Roullit --- lib/librte_ether/rte_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index 6bd7b26d06..eb0a94a9ac 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -2370,7 +2370,7 @@ rte_eth_mirror_rule_set(uint8_t port_id, struct rte_eth_mirror_conf *mirror_conf, uint8_t rule_id, uint8_t on) { - struct rte_eth_dev *dev = &rte_eth_devices[port_id]; + struct rte_eth_dev *dev; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); if (mirror_conf->rule_type == 0) { @@ -2406,7 +2406,7 @@ rte_eth_mirror_rule_set(uint8_t port_id, int rte_eth_mirror_rule_reset(uint8_t port_id, uint8_t rule_id) { - struct rte_eth_dev *dev = &rte_eth_devices[port_id]; + struct rte_eth_dev *dev; RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); -- 2.20.1