Skip to content

Instantly share code, notes, and snippets.

@jonm
Created October 11, 2015 17:19
Show Gist options
  • Save jonm/e553a9b42e7d4a9957a0 to your computer and use it in GitHub Desktop.
Save jonm/e553a9b42e7d4a9957a0 to your computer and use it in GitHub Desktop.
complaints about extraneous parentheses
[~/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 act.obj1.o act.obj1.c
act.obj1.c:51:39: error: equality comparison with extraneous parentheses
[-Werror,-Wparentheses-equality]
if((obj_object->obj_flags.type_flag == ITEM_MONEY)) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
act.obj1.c:51:39: note: remove extraneous parentheses around the comparison to
silence this warning
if((obj_object->obj_flags.type_flag == ITEM_MONEY)) {
~ ^ ~
act.obj1.c:51:39: note: use '=' to turn this equality comparison into an
assignment
if((obj_object->obj_flags.type_flag == ITEM_MONEY)) {
^~
=
...
14 errors generated.
make: *** [act.obj1.o] Error 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment