From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 12/22] lib: fix unused values
Date: Wed, 20 Mar 2013 17:05:00 +0100 [thread overview]
Message-ID: <c1d5c4b01aba0e2cb94176c1adf74e0f5681297e.1363795499.git.thomas.monjalon@6wind.com> (raw)
In-Reply-To: <cover.1363795499.git.thomas.monjalon@6wind.com>
In-Reply-To: <cover.1363795499.git.thomas.monjalon@6wind.com>
From: Zijie Pan <zijie.pan@6wind.com>
Fix warnings of type "Value stored to 'xxx' is never read".
Acked-by: Ivan Boule <ivan.boule@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Zijie Pan <zijie.pan@6wind.com>
---
lib/librte_cmdline/cmdline_parse_ipaddr.c | 1 -
lib/librte_eal/linuxapp/eal/eal_thread.c | 2 --
lib/librte_lpm/rte_lpm.c | 2 +-
lib/librte_pmd_igb/e1000_rxtx.c | 2 --
lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 4 ++++
5 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/lib/librte_cmdline/cmdline_parse_ipaddr.c b/lib/librte_cmdline/cmdline_parse_ipaddr.c
index 66a1493..a7dcd2b 100644
--- a/lib/librte_cmdline/cmdline_parse_ipaddr.c
+++ b/lib/librte_cmdline/cmdline_parse_ipaddr.c
@@ -262,7 +262,6 @@ inet_pton6(const char *src, unsigned char *dst)
inet_pton4(curtok, tp) > 0) {
tp += INADDRSZ;
saw_xdigit = 0;
- count_xdigit = 0;
break; /* '\0' was seen by inet_pton4(). */
}
return (0);
diff --git a/lib/librte_eal/linuxapp/eal/eal_thread.c b/lib/librte_eal/linuxapp/eal/eal_thread.c
index 7409d28..d36030e 100644
--- a/lib/librte_eal/linuxapp/eal/eal_thread.c
+++ b/lib/librte_eal/linuxapp/eal/eal_thread.c
@@ -86,7 +86,6 @@ rte_eal_remote_launch(int (*f)(void *), void *arg, unsigned slave_id)
rte_panic("cannot write on configuration pipe\n");
/* wait ack */
- n = 0;
do {
n = read(s2m, &c, 1);
} while (n < 0 && errno == EINTR);
@@ -203,7 +202,6 @@ eal_thread_loop(__attribute__((unused)) void *arg)
void *fct_arg;
/* wait command */
- n = 0;
do {
n = read(m2s, &c, 1);
} while (n < 0 && errno == EINTR);
diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c
index 4269b3c..bb1ec48 100644
--- a/lib/librte_lpm/rte_lpm.c
+++ b/lib/librte_lpm/rte_lpm.c
@@ -276,7 +276,7 @@ rule_add(struct rte_lpm *lpm, uint32_t ip_masked, uint8_t depth,
last_rule = rule_gindex + lpm->used_rules_at_depth[depth - 1];
/* Scan through rule group to see if rule already exists. */
- for (rule_index = rule_gindex; rule_index < last_rule; rule_index++) {
+ for (; rule_index < last_rule; rule_index++) {
/* If rule already exists update its next_hop and return. */
if (lpm->rules_tbl[rule_index].ip == ip_masked) {
diff --git a/lib/librte_pmd_igb/e1000_rxtx.c b/lib/librte_pmd_igb/e1000_rxtx.c
index a891d12..96b0682 100644
--- a/lib/librte_pmd_igb/e1000_rxtx.c
+++ b/lib/librte_pmd_igb/e1000_rxtx.c
@@ -1247,8 +1247,6 @@ eth_igb_tx_queue_setup(struct rte_eth_dev *dev,
txq->tx_ring_phys_addr = (uint64_t) tz->phys_addr;
txq->tx_ring = (union e1000_adv_tx_desc *) tz->addr;
- size = sizeof(union e1000_adv_tx_desc) * nb_desc;
-
/* Allocate software ring */
txq->sw_ring = rte_zmalloc("txq->sw_ring",
sizeof(struct igb_tx_entry) * nb_desc,
diff --git a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c
index f3b3cda..6f41fbe 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c
@@ -507,6 +507,10 @@ eth_ixgbevf_dev_init(__attribute__((unused)) struct eth_driver *eth_drv,
hw->mac.num_rar_entries = hw->mac.max_rx_queues;
diag = hw->mac.ops.reset_hw(hw);
+ if (diag != IXGBE_SUCCESS) {
+ PMD_INIT_LOG(ERR, "VF Initialization Failure: %d", diag);
+ return (diag);
+ }
/* Allocate memory for storing MAC addresses */
eth_dev->data->mac_addrs = rte_zmalloc("ixgbevf", ETHER_ADDR_LEN *
--
1.7.2.5
next prev parent reply other threads:[~2013-03-20 16:07 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-20 16:04 [dpdk-dev] [PATCH 00/22] upgrade with 6WIND's enhancements Thomas Monjalon
2013-03-20 16:04 ` [dpdk-dev] [PATCH 01/22] mk: use $CC to detect toolchain version Thomas Monjalon
2013-03-20 16:04 ` [dpdk-dev] [PATCH 02/22] mk: fix typo in LDFLAGS for 32-bit Thomas Monjalon
2013-03-20 16:04 ` [dpdk-dev] [PATCH 03/22] mk: fix verbose display of install command Thomas Monjalon
2013-03-20 16:04 ` [dpdk-dev] [PATCH 04/22] mk: add a makefile for shared libraries Thomas Monjalon
2013-03-20 16:04 ` [dpdk-dev] [PATCH 05/22] mk: allow corei7-avx flag with gcc 4.7 Thomas Monjalon
2013-03-20 16:04 ` [dpdk-dev] [PATCH 06/22] app: fix volatile read for GCC >= 4.6 Thomas Monjalon
2013-03-20 16:04 ` [dpdk-dev] [PATCH 07/22] app: fix unused values Thomas Monjalon
2013-03-20 16:04 ` [dpdk-dev] [PATCH 08/22] app: use (void)variable when unused Thomas Monjalon
2013-03-20 16:04 ` [dpdk-dev] [PATCH 09/22] app: fix testpmd compliance with __rte_mbuf_sanity_check() Thomas Monjalon
2013-03-20 16:04 ` [dpdk-dev] [PATCH 10/22] app: fix config crash in testpmd Thomas Monjalon
2013-03-20 16:04 ` [dpdk-dev] [PATCH 11/22] app: fix autotest summary in error cases Thomas Monjalon
2013-03-20 16:05 ` Thomas Monjalon [this message]
2013-03-20 16:05 ` [dpdk-dev] [PATCH 13/22] lib: fix uninitialized variables Thomas Monjalon
2013-03-20 16:05 ` [dpdk-dev] [PATCH 14/22] lib: fix non-C99 macros definitions in exported headers Thomas Monjalon
2013-03-20 16:05 ` [dpdk-dev] [PATCH 15/22] mem: fix access to huge page with high address Thomas Monjalon
2013-03-20 16:05 ` [dpdk-dev] [PATCH 16/22] timer: check TSC reliability Thomas Monjalon
2013-03-20 16:05 ` [dpdk-dev] [PATCH 17/22] timer: get TSC frequency from /proc/cpuinfo Thomas Monjalon
2013-03-20 16:05 ` [dpdk-dev] [PATCH 18/22] timer: option --vmware-tsc-map for VMware guest Thomas Monjalon
2013-03-20 16:05 ` [dpdk-dev] [PATCH 19/22] pci: reference driver structure for each device Thomas Monjalon
2013-03-20 16:05 ` [dpdk-dev] [PATCH 20/22] pci: allow drivers to be bound several times to the same PCI device Thomas Monjalon
2013-03-20 16:05 ` [dpdk-dev] [PATCH 21/22] igb_uio: fix driver dependency Thomas Monjalon
2013-03-20 16:05 ` [dpdk-dev] [PATCH 22/22] igb_uio: fix build with kernel >= 3.8 Thomas Monjalon
2013-03-20 16:58 ` [dpdk-dev] [PATCH 00/22] upgrade with 6WIND's enhancements Vincent JARDIN
2013-03-21 9:40 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c1d5c4b01aba0e2cb94176c1adf74e0f5681297e.1363795499.git.thomas.monjalon@6wind.com \
--to=thomas.monjalon@6wind.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).