summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZijie Pan <zijie.pan@6wind.com>2012-12-05 14:13:34 +0800
committerThomas Monjalon <thomas.monjalon@6wind.com>2013-07-25 16:07:51 +0200
commit1b62bb7d7d1113cd1ba33103e14d61f79237e285 (patch)
treec2aff9259e890f9164991047661fc006b7549a68
parent85f5ae8b70062bef6e9289542879e007945a29f1 (diff)
downloaddpdk-1b62bb7d7d1113cd1ba33103e14d61f79237e285.zip
dpdk-1b62bb7d7d1113cd1ba33103e14d61f79237e285.tar.gz
dpdk-1b62bb7d7d1113cd1ba33103e14d61f79237e285.tar.xz
app: fix unused values
Fix warnings of type "Value stored to 'xxx' is never read". Signed-off-by: Zijie Pan <zijie.pan@6wind.com> Acked-by: Ivan Boule <ivan.boule@6wind.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
-rw-r--r--app/test-pmd/config.c1
-rw-r--r--app/test/test.c1
-rw-r--r--app/test/test_lpm.c4
-rw-r--r--app/test/test_ring.c7
4 files changed, 2 insertions, 11 deletions
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index f85540c..789d5f1 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -650,7 +650,6 @@ setup_fwd_config_of_each_lcore(struct fwd_config *cfg)
nb_fs_per_lcore = (streamid_t) (nb_fs / nb_fc);
nb_extra = (lcoreid_t) (nb_fs % nb_fc);
}
- nb_extra = (lcoreid_t) (nb_fs % nb_fc);
nb_lc = (lcoreid_t) (nb_fc - nb_extra);
sm_id = 0;
diff --git a/app/test/test.c b/app/test/test.c
index a7c500b..816c348 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -134,7 +134,6 @@ main(int argc, char **argv)
rte_timer_subsystem_init();
- argc -= ret;
argv += ret;
prgname = argv[0];
diff --git a/app/test/test_lpm.c b/app/test/test_lpm.c
index af51194..158d8ac 100644
--- a/app/test/test_lpm.c
+++ b/app/test/test_lpm.c
@@ -725,7 +725,6 @@ test10(void)
ip = IPv4(128, 0, 0, 0);
depth = 24;
- next_hop_add = 100;
status = rte_lpm_delete(lpm, ip, depth);
TEST_LPM_ASSERT(status < 0);
@@ -739,7 +738,6 @@ test10(void)
ip = IPv4(128, 0, 0, 0);
depth = 32;
- next_hop_add = 100;
status = rte_lpm_delete(lpm, ip, depth);
TEST_LPM_ASSERT(status < 0);
@@ -945,7 +943,7 @@ test14(void)
next_hop_add = 100;
/* Add 256 rules that require a tbl8 extension */
- for (ip = 0; ip <= IPv4(0, 0, 255, 0); ip += 256) {
+ for (; ip <= IPv4(0, 0, 255, 0); ip += 256) {
status = rte_lpm_add(lpm, ip, depth, next_hop_add);
TEST_LPM_ASSERT(status == 0);
diff --git a/app/test/test_ring.c b/app/test/test_ring.c
index 9a07479..ecc7531 100644
--- a/app/test/test_ring.c
+++ b/app/test/test_ring.c
@@ -579,7 +579,7 @@ test_set_watermark( void ){
}
count = 0;
- setwm = rte_ring_set_water_mark(r, count);
+ rte_ring_set_water_mark(r, count);
if (r->prod.watermark != r->prod.size) {
printf("Test failed to detect invalid watermark count value\n");
goto error;
@@ -820,18 +820,13 @@ test_ring_basic(void)
cur_dst = dst;
ret = rte_ring_mp_enqueue(r, cur_src);
- cur_src += 1;
if (ret != 0)
goto fail;
ret = rte_ring_mc_dequeue(r, cur_dst);
- cur_dst += 1;
if (ret != 0)
goto fail;
- cur_src = src;
- cur_dst = dst;
-
if (src)
free(src);
if (dst)