kvlist: avoid unused-but-set warnings in code not using the name in kvlist_for_each()
authorFelix Fietkau <nbd@openwrt.org>
Tue, 15 Apr 2014 14:58:55 +0000 (16:58 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 15 Apr 2014 14:58:55 +0000 (16:58 +0200)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
kvlist.h

index 339cc1db8a1ced0f854f0e95689847479784ecbc..a4e1b1d83b606b4576ea13e4cd1dc020e00f0d52 100644 (file)
--- a/kvlist.h
+++ b/kvlist.h
@@ -37,7 +37,7 @@ struct kvlist_node {
 
 #define kvlist_for_each(kv, name, value) \
        for (value = (void *) __avl_list_to_kv((kv)->avl.list_head.next)->data,                 \
-            name = (const char *) __ptr_to_kv(value)->avl.key;                                 \
+            name = (const char *) __ptr_to_kv(value)->avl.key, (void) name;                    \
             &__ptr_to_kv(value)->avl.list != &(kv)->avl.list_head;                             \
             value = (void *) (__avl_list_to_kv(__ptr_to_kv(value)->avl.list.next))->data,      \
             name = (const char *) __ptr_to_kv(value)->avl.key)