Created
October 10, 2015 20:10
-
-
Save jonm/ba420c534174f0a3d7e2 to your computer and use it in GitHub Desktop.
using an assignment as a conditional
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[~/src/SillyMUD/src]$ make | |
gcc -g -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -Werror -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -c -o comm.o comm.c | |
comm.c:1538:18: error: using the result of an assignment as a condition without | |
parentheses [-Werror,-Wparentheses] | |
while (*point = *(i++)) | |
~~~~~~~^~~~~~~~ | |
comm.c:1538:18: note: place parentheses around the assignment to silence this | |
warning | |
while (*point = *(i++)) | |
^ | |
( ) | |
comm.c:1538:18: note: use '==' to turn this assignment into an equality | |
comparison | |
while (*point = *(i++)) | |
^ | |
== | |
... | |
2 errors generated. | |
make: *** [comm.o] Error 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment