[PATCH 3/3] fix unused value warning

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

 



This patch silences this warning:
warning: right-hand operand of comma expression has no effect[-Wunused-value]

The prefetch macro doesn't seam to be doing anything, but I will
leave it to Pablo to decide if it should be removed entirely.

Signed-off-by: Asbjørn Sloth Tønnesen <ast@xxxxxxxxxx>
---
 include/linux_list.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux_list.h b/include/linux_list.h
index de182a4..91d9c6a 100644
--- a/include/linux_list.h
+++ b/include/linux_list.h
@@ -340,8 +340,8 @@ static inline void list_splice_init(struct list_head *list,
  * @head:	the head for your list.
  */
 #define list_for_each(pos, head) \
-	for (pos = (head)->next, prefetch(pos->next); pos != (head); \
-        	pos = pos->next, prefetch(pos->next))
+	for (pos = (head)->next, (void) prefetch(pos->next); pos != (head); \
+		pos = pos->next, (void) prefetch(pos->next))
 
 /**
  * __list_for_each	-	iterate over a list
@@ -383,10 +383,10 @@ static inline void list_splice_init(struct list_head *list,
  */
 #define list_for_each_entry(pos, head, member)				\
 	for (pos = list_entry((head)->next, typeof(*pos), member),	\
-		     prefetch(pos->member.next);			\
+		     (void) prefetch(pos->member.next);			\
 	     &pos->member != (head); 					\
 	     pos = list_entry(pos->member.next, typeof(*pos), member),	\
-		     prefetch(pos->member.next))
+		     (void) prefetch(pos->member.next))
 
 /**
  * list_for_each_entry_reverse - iterate backwards over list of given type.
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux