|
Bugzilla – Full Text Bug Listing |
| Summary: | [LLVM] error: using the result of an assignment as a condition without parentheses | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Gustavo J. A. M. Carneiro <gjcarneiro> |
| Component: | internet | Assignee: | George Riley <riley> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | ns-bugs |
| Priority: | P5 | ||
| Version: | ns-3-dev | ||
| Hardware: | All | ||
| OS: | All | ||
Fixed, changeset 7741 - 2eec1176940e |
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))) ^ ( )