diff --git a/lib/checkuninitvar.cpp b/lib/checkuninitvar.cpp index 83ab37508..463f09d8e 100644 --- a/lib/checkuninitvar.cpp +++ b/lib/checkuninitvar.cpp @@ -1432,8 +1432,8 @@ bool CheckUninitVar::checkScopeForVariable(const Scope* scope, const Token *tok, return true; } - // bailout if there is assembler code - if (Token::simpleMatch(tok, "asm (")) { + // bailout if there is assembler code or setjmp + if (Token::Match(tok, "asm|setjmp (")) { return true; } diff --git a/test/testuninitvar.cpp b/test/testuninitvar.cpp index 927765bfe..73e8d974e 100644 --- a/test/testuninitvar.cpp +++ b/test/testuninitvar.cpp @@ -620,7 +620,7 @@ private: " a = 1;\n" " longjmp(env, 1);\n" "}"); - TODO_ASSERT_EQUALS("", "[test.cpp:7]: (error) Uninitialized variable: a\n", errout.str()); + ASSERT_EQUALS("", errout.str()); // macro_for.. checkUninitVarB("int foo()\n"