Bugzilla – Bug 1368
[LLVM] error: using the result of an assignment as a condition without parentheses
Last modified: 2012-02-23 18:30:55 UTC
With clang++: ../src/internet/model/ipv4-l3-protocol.cc:236:18: error: using the result of an assignment as a condition without parentheses [-Werror,-Wparentheses] if (device = DynamicCast<LoopbackNetDevice> (m_node->GetDevice (i))) ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/internet/model/ipv4-l3-protocol.cc:236:18: note: use '==' to turn this assignment into an equality comparison if (device = DynamicCast<LoopbackNetDevice> (m_node->GetDevice (i))) ^ == ../src/internet/model/ipv4-l3-protocol.cc:236:18: note: place parentheses around the assignment to silence this warning if (device = DynamicCast<LoopbackNetDevice> (m_node->GetDevice (i))) ^ ( )
Fixed, changeset 7741 - 2eec1176940e