You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reportError(tok, Severity::warning, "classPublicInterfaceDivZero", "Arbitrary usage of public method " + functionName + "() could result in division by zero.");
reportError(tok, Severity::warning, "classPublicInterfaceDivZero", "Public interface of " + className + " is not safe. When calling " + s + ", if parameter " + varName + " is 0 that leads to division by zero.");
Copy file name to clipboardExpand all lines: test/testclass.cpp
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -6517,7 +6517,7 @@ class TestClass : public TestFixture {
6517
6517
" void dostuff(int x);\n"
6518
6518
"}\n"
6519
6519
"void A::dostuff(int x) { int a = 1000 / x; }");
6520
-
ASSERT_EQUALS("[test.cpp:5]: (warning) Arbitrary usage of public method A::dostuff() could result in division by zero.\n", errout.str());
6520
+
ASSERT_EQUALS("[test.cpp:5]: (warning) Public interface of A is not safe. When calling A::dostuff(), if parameter x is 0 that leads to division by zero.\n", errout.str());
6521
6521
6522
6522
checkPublicInterfaceDivZero("class A {\n"
6523
6523
"public:\n"
@@ -6526,7 +6526,7 @@ class TestClass : public TestFixture {
6526
6526
"}\n"
6527
6527
"void A::f1() {}\n"
6528
6528
"void A::f2(int x) { int a = 1000 / x; }");
6529
-
ASSERT_EQUALS("[test.cpp:7]: (warning) Arbitrary usage of public method A::f2() could result in division by zero.\n", errout.str());
6529
+
ASSERT_EQUALS("[test.cpp:7]: (warning) Public interface of A is not safe. When calling A::f2(), if parameter x is 0 that leads to division by zero.\n", errout.str());
0 commit comments