From: Zijie Pan Date: Wed, 5 Dec 2012 06:13:34 +0000 (+0800) Subject: app: fix unused values X-Git-Tag: spdx-start~11274 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=1b62bb7d7d1113cd1ba33103e14d61f79237e285;p=dpdk.git app: fix unused values Fix warnings of type "Value stored to 'xxx' is never read". Signed-off-by: Zijie Pan Acked-by: Ivan Boule Acked-by: Adrien Mazarguil --- diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index f85540c762..789d5f1c98 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 a7c500bb4e..816c3487ed 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 af511947b7..158d8ace1f 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 9a07479dbe..ecc753122b 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)