omnetpp-resultfiles icon indicating copy to clipboard operation
omnetpp-resultfiles copied to clipboard

Add parenthesis around a macro parameter

Open tim-ist opened this issue 5 years ago • 0 comments

My compiler caught a problem caused by using a macro parameter without parenthesis.

scave/indexedvectorfilereader.cc:160:9: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
        CHECK(vectorId == vector->vectorId, "vector file reader: unexpected vector id");
        ^              ~~
scave/indexedvectorfilereader.cc:127:31: note: expanded from macro 'CHECK'
#define CHECK(cond, msg) {if (!cond) throw opp_runtime_error(msg ", file %s, offset %"LL"d", file, (int64)offset); }```

tim-ist avatar Mar 21 '19 14:03 tim-ist