Skip to content
This repository has been archived by the owner on Jan 21, 2021. It is now read-only.

Add parenthesis around a macro parameter #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tim-ist
Copy link

@tim-ist tim-ist commented Mar 21, 2019

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); }```

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant