When compiling with clang, the following warning is emitted:
abg-reader.cc:1981:15: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
while (corp = read_corpus_from_input(ctxt))
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
That is certainly a common pitfall and can be mitigated by placing
parentheses around the assignment.
* src/abg-reader.cc: clarify boolean use of assignment
Signed-off-by: Matthias Maennich <maennich@google.com>
ctxt.set_corpus_node(node);
corpus_sptr corp;
- while (corp = read_corpus_from_input(ctxt))
+ while ((corp = read_corpus_from_input(ctxt)))
ctxt.get_corpus_group()->add_corpus(corp);
xmlTextReaderNext(reader.get());