|
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: | applications | Assignee: | George Riley <riley> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | daniel.camara, ns-bugs |
| Priority: | P5 | ||
| Version: | ns-3-dev | ||
| Hardware: | All | ||
| OS: | All | ||
| Bug Depends on: | |||
| Bug Blocks: | 1345 | ||
| Attachments: | patch to add parenthesis | ||
More of the same:
../src/applications/model/ping6.cc:234:17: error: using the result of an assignment as a condition without parentheses
[-Werror,-Wparentheses]
while (packet = socket->RecvFrom (from))
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
../src/applications/model/ping6.cc:234:17: note: use '==' to turn this assignment into an equality comparison
while (packet = socket->RecvFrom (from))
^
==
../src/applications/model/ping6.cc:234:17: note: place parentheses around the assignment to silence this warning
while (packet = socket->RecvFrom (from))
^
( )
1 error generated.
and:
../src/applications/model/packet-sink.cc:171:17: error: using the result of an assignment as a condition without parentheses
[-Werror,-Wparentheses]
while (packet = socket->RecvFrom (from))
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
../src/applications/model/packet-sink.cc:171:17: note: use '==' to turn this assignment into an equality comparison
while (packet = socket->RecvFrom (from))
^
==
../src/applications/model/packet-sink.cc:171:17: note: place parentheses around the assignment to silence this warning
while (packet = socket->RecvFrom (from))
^
( )
1 error generated.
../src/applications/model/radvd.cc:238:17: error: using the result of an assignment as a condition without parentheses
[-Werror,-Wparentheses]
while (packet = socket->RecvFrom (from))
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
../src/applications/model/radvd.cc:238:17: note: use '==' to turn this assignment into an equality comparison
while (packet = socket->RecvFrom (from))
^
==
../src/applications/model/radvd.cc:238:17: note: place parentheses around the assignment to silence this warning
while (packet = socket->RecvFrom (from))
^
( )
1 error generated.
../src/applications/model/udp-server.cc:155:17: error: using the result of an assignment as a condition without parentheses
[-Werror,-Wparentheses]
while (packet = socket->RecvFrom (from))
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
../src/applications/model/udp-server.cc:155:17: note: use '==' to turn this assignment into an equality comparison
while (packet = socket->RecvFrom (from))
^
==
../src/applications/model/udp-server.cc:155:17: note: place parentheses around the assignment to silence this warning
while (packet = socket->RecvFrom (from))
^
( )
1 error generated.
../src/applications/model/udp-echo-server.cc:146:17: error: using the result of an assignment as a condition without parentheses
[-Werror,-Wparentheses]
while (packet = socket->RecvFrom (from))
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
../src/applications/model/udp-echo-server.cc:146:17: note: use '==' to turn this assignment into an equality comparison
while (packet = socket->RecvFrom (from))
^
==
../src/applications/model/udp-echo-server.cc:146:17: note: place parentheses around the assignment to silence this warning
while (packet = socket->RecvFrom (from))
^
( )
1 error generated.
Created attachment 1336 [details]
patch to add parenthesis
The patch worked for me :) Path applied mercurial changeset: 7760:e98d9c028d7f |
[ 931/1334] cxx: src/applications/model/udp-echo-client.cc -> build/src/applications/model/udp-echo-client.cc.1.o ../src/applications/model/udp-echo-client.cc:331:17: error: using the result of an assignment as a condition without parentheses [-Werror,-Wparentheses] while (packet = socket->RecvFrom (from)) ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ ../src/applications/model/udp-echo-client.cc:331:17: note: use '==' to turn this assignment into an equality comparison while (packet = socket->RecvFrom (from)) ^ == ../src/applications/model/udp-echo-client.cc:331:17: note: place parentheses around the assignment to silence this warning while (packet = socket->RecvFrom (from)) ^ ( ) 1 error generated.