Hi,

We're looking at the coverity results and there are lots of issues of
Incorrect expression
Assign_where_compare_meant: use of "=" where "==" may have been intended

Because in our source code, we have
HMAP_FOR_EACH_WITH_HASH(id_node, node, hash, &pool->map) {
...

And Due to "(NODE = NULL)" in the CONDITION statement below:
#define HMAP_FOR_EACH_WITH_HASH(NODE, MEMBER, HASH, HMAP)               \
    for (INIT_CONTAINER(NODE, hmap_first_with_hash(HMAP, HASH), MEMBER); \
         (NODE != OBJECT_CONTAINING(NULL, NODE, MEMBER)) || (NODE = NULL); \
         ASSIGN_CONTAINER(NODE, hmap_next_with_hash(&(NODE)->MEMBER),   \
                          MEMBER))

While this is correct, I wonder how can we avoid this?
Thanks
William
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to