Clang warnings corrections.

Issue #104 new
Nicky Perian created an issue

Comments (2)

  1. Nicky Perian reporter

    Please disregard. Looks like the logic if (size == 1 || (size > 1 && action.find(tokens[1]) != -1)) { isn't correct with this change. Should it be if (size == 1 || size > 1) && (action.find(tokens[1]) != -1)) {

    the warnings we receive receive are

    /Users/dayturn/Library/Developer/kokuant/indra/newview/RRInterface.cpp:770:27: note: place parentheses around the '&&' expression to silence this warning
    it->second == action && mContainsPermissive) { ^
    ( )
    /Users/dayturn/Library/Developer/kokuant/indra/newview/RRInterface.cpp:1210:30: warning: '&&' within ' ' [-Wlogical-op-parentheses] if (size == 1 size > 1 && action.find(tokens[1]) != -1) { ~^~~~~~~~~
    /Users/dayturn/Library/Developer/kokuant/indra/newview/RRInterface.cpp:1210:30: note: place parentheses around the '&&' expression to silence this warning
    if (size == 1 size > 1 && action.find(tokens[1]) != -1) { ^
    ( )
    /Users/dayturn/Library/Developer/kokuant/indra/newview/RRInterface.cpp:2221:17: warning: '&&' within ' ' [-Wlogical-op-parentheses] if( avatar && avatar->isWearingAttachment( item->getLinkedUUID() )
    /Users/dayturn/Library/Developer/kokuant/indra/newview/RRInterface.cpp:2221:17: note: place parentheses around the '&&' expression to silence this warning
    if( avatar && avatar->isWearingAttachment( item->getLinkedUUID() )
    ^
    ( )
    /Users/dayturn/Library/Developer/kokuant/indra/newview/RRInterface.cpp:3808:19: warning: unused variable 'it' [-Wunused-variable]
    RRMAP::iterator it = mSpecialObjectBehaviours.begin ();
    ^
    /Users/dayturn/Library/Developer/kokuant/indra/newview/RRInterface.cpp:3916:19: warning: unused variable 'it' [-Wunused-variable]
    RRMAP::iterator it = mSpecialObjectBehaviours.begin ();
    ^
    5 warnings generated.

  2. Log in to comment