mirror of
https://github.com/openvswitch/ovs
synced 2025-10-25 15:07:05 +00:00
clang: Fix the "expression result unused" warning.
This commit makes macro function "ASSIGN_CONTAINER()" evaluates to "(void)0". This is to avoid the 'clang' warning: "expression result unused", since most of time, the final evaluated value is not used. Signed-off-by: Alex Wang <alexw@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
@@ -147,7 +147,7 @@ struct hindex_node *hindex_node_with_hash(const struct hindex *, size_t hash);
|
||||
#define HINDEX_FOR_EACH_SAFE(NODE, NEXT, MEMBER, HINDEX) \
|
||||
for (ASSIGN_CONTAINER(NODE, hindex_first(HINDEX), MEMBER); \
|
||||
(NODE != OBJECT_CONTAINING(NULL, NODE, MEMBER) \
|
||||
? ASSIGN_CONTAINER(NEXT, hindex_next(HINDEX, &(NODE)->MEMBER), MEMBER) \
|
||||
? ASSIGN_CONTAINER(NEXT, hindex_next(HINDEX, &(NODE)->MEMBER), MEMBER), 1 \
|
||||
: 0); \
|
||||
(NODE) = (NEXT))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user