Hello Everyone, I am seeing the below compiler warnings with GCC version 6.1 on Fedora 24.
$gcc --version gcc (GCC) 6.1.1 20160621 (Red Hat 6.1.1-3) libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I ../include -I ./include -I ../lib -I ./lib -Wstrict-prototypes -Wall -Wextra -Wno-sign-compare -Wpointer-arith -Wswitch-enum -Wunused-parameter -Wbad-function-cast -Wcast-align -Wmissing-prototypes -Wmissing-field-initializers -fno-strict-aliasing -Werror -g -O2 -MT lib/classifier.lo -MD -MP -MF lib/.deps/classifier.Tpo -c ../lib/classifier.c -o lib/classifier.o ../lib/classifier.c: In function ‘cls_match_alloc’: ../lib/classifier.c:96:53: error: self-comparison always evaluates to true [-Werror=tautological-compare] *CONST_CAST(const struct cls_rule **, &cls_match->cls_rule) = rule; ^~ ../lib/classifier.c: In function ‘cls_rule_set_conjunctions’: ../lib/classifier.c:248:51: error: self-comparison always evaluates to true [-Werror=tautological-compare] = ovsrcu_get_protected(struct cls_conjunction_set *, &match->conj_set); ^~ ../lib/classifier.c: In function ‘classifier_replace’: ../lib/classifier.c:617:68: error: self-comparison always evaluates to true [-Werror=tautological-compare] conj_set = ovsrcu_get_protected(struct cls_conjunction_set *, ^~ ../lib/classifier.c: In function ‘classifier_remove’: ../lib/classifier.c:816:56: error: self-comparison always evaluates to true [-Werror=tautological-compare] conj_set = ovsrcu_get_protected(struct cls_conjunction_set *, ^~ ../lib/classifier.c: In function ‘destroy_subtable’: ../lib/classifier.c:1518:45: error: self-comparison always evaluates to true [-Werror=tautological-compare] ovs_assert(ovsrcu_get_protected(struct trie_node *, &subtable->ports_trie) ^~ ../lib/classifier.c: In function ‘trie_destroy’: ../lib/classifier.c:1854:70: error: self-comparison always evaluates to true [-Werror=tautological-compare] struct trie_node *node = ovsrcu_get_protected(struct trie_node *, trie); ^~ ../lib/classifier.c: In function ‘trie_insert_prefix’: ../lib/classifier.c:2049:60: error: self-comparison always evaluates to true [-Werror=tautological-compare] for (; (node = ovsrcu_get_protected(struct trie_node *, edge)); ^~ ../lib/classifier.c: In function ‘trie_remove_prefix’: ../lib/classifier.c:2108:58: error: self-comparison always evaluates to true [-Werror=tautological-compare] (node = ovsrcu_get_protected(struct trie_node *, edges[depth])); ^~ ../lib/classifier.c:2130:70: error: self-comparison always evaluates to true [-Werror=tautological-compare] *edge0 = ovsrcu_get_protected(struct trie_node *, ^ ../lib/classifier.c:2132:70: error: self-comparison always evaluates to true [-Werror=tautological-compare] *edge1 = ovsrcu_get_protected(struct trie_node *, ^ ../lib/classifier.c:2160:64: error: self-comparison always evaluates to true [-Werror=tautological-compare] node = ovsrcu_get_protected(struct trie_node *, ^ cc1: all warnings being treated as errors Makefile:4190: recipe for target 'lib/classifier.lo' failed Thanks Numan
_______________________________________________ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss