[libnfnetlink PATCH 1/2] include: Silence gcc warning in linux_list.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Compiler complained about empty prefetch() macro:

| ../include/linux_list.h:385:66: warning: right-hand operand of comma expression has no effect [-Wunused-value]
|   385 |         for (pos = list_entry((head)->next, typeof(*pos), member),      \
|       |                                                                  ^

Use nftables' variant instead which gcc seems to like more.

Fixes: 36d2ed3de20a3 ("major cleanup of index2name infrastructure: use linux list (and fix leak in the nlif_close path)")
Signed-off-by: Phil Sutter <phil@xxxxxx>
---
 include/linux_list.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux_list.h b/include/linux_list.h
index de182a4764706..cf71837f18347 100644
--- a/include/linux_list.h
+++ b/include/linux_list.h
@@ -29,7 +29,7 @@
 	1; \
 })
 
-#define prefetch(x)		1
+#define prefetch(x) ((void)0)
 
 /* empty define to make this work in userspace -HW */
 #ifndef smp_wmb
-- 
2.34.1




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux