diff --git a/lib/mathlib.cpp b/lib/mathlib.cpp index 0e59ed46b..3f1c84dd3 100644 --- a/lib/mathlib.cpp +++ b/lib/mathlib.cpp @@ -547,7 +547,6 @@ std::string MathLib::incdec(const std::string & var, const std::string & op) return MathLib::subtract(var, "1"); throw InternalError(0, std::string("Unexpected operation '") + op + "' in MathLib::incdec(). Please report this to Cppcheck developers."); - return ""; } std::string MathLib::divide(const std::string &first, const std::string &second) diff --git a/test/testother.cpp b/test/testother.cpp index 2294a91b9..40e640c12 100644 --- a/test/testother.cpp +++ b/test/testother.cpp @@ -7251,10 +7251,8 @@ private: void integerOverflow() { // 5895 // no signed integer overflow should happen - check("#define A 0x89504e470d0a1a0a\n" - "#define B 0x8a4d4e470d0a1a0a\n" - "void f(unsigned long long ull) {\n" - " if (ull == A || ull == B);\n" + check("void f(unsigned long long ull) {\n" + " if (ull == 0x89504e470d0a1a0a || ull == 0x8a4d4e470d0a1a0a) ;\n" "}\n"); ASSERT_EQUALS("", errout.str()); }