[dpdk-dev] [PATCH 08/22] app: use (void)variable when unused

Thomas Monjalon thomas.monjalon at 6wind.com
Wed Mar 20 17:04:56 CET 2013


From: Olivier Matz <olivier.matz at 6wind.com>

When compiling with llvm-clang, the notation "variable = variable"
produces a warning. We shall use "(void)variable" instead.

Acked-by: Ivan Boule <ivan.boule at 6wind.com>
Signed-off-by: Olivier Matz <olivier.matz at 6wind.com>
---
 app/test/test_hash.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/test/test_hash.c b/app/test/test_hash.c
index 5992fa3..528baba 100644
--- a/app/test/test_hash.c
+++ b/app/test/test_hash.c
@@ -1604,7 +1604,7 @@ test_hash_jhash_1word(const void *key, uint32_t length, uint32_t initval)
 {
 	const uint32_t *k = key;
 
-	length =length;
+	(void)length;
 
 	return rte_jhash_1word(k[0], initval);
 }
@@ -1614,7 +1614,7 @@ test_hash_jhash_2word(const void *key, uint32_t length, uint32_t initval)
 {
 	const uint32_t *k = key;
 
-	length =length;
+	(void)length;
 
 	return rte_jhash_2words(k[0], k[1], initval);
 }
@@ -1624,7 +1624,7 @@ test_hash_jhash_3word(const void *key, uint32_t length, uint32_t initval)
 {
 	const uint32_t *k = key;
 
-	length =length;
+	(void)length;
 
 	return rte_jhash_3words(k[0], k[1], k[2], initval);
 }
-- 
1.7.2.5




More information about the dev mailing list