diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 79abbd177..2919eb875 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -1377,7 +1377,7 @@ void CheckOther::checkVariableScope() bool reduce = true; bool used = false; // Don't warn about unused variables for (; tok != var->scope()->classEnd; tok = tok->next()) { - if (tok->str() == "{" && tok->scope() != tok->previous()->scope()) { + if (tok->str() == "{" && tok->scope() != tok->previous()->scope() && !tok->isExpandedMacro()) { if (used) { bool used2 = false; if (!checkInnerScope(tok, var, used2) || used2) {