diff --git a/lib/checkstring.cpp b/lib/checkstring.cpp index 16ff8dc0f..6bbfb9098 100644 --- a/lib/checkstring.cpp +++ b/lib/checkstring.cpp @@ -66,7 +66,7 @@ void CheckString::stringLiteralWriteError(const Token *tok, const Token *strValu s = s.substr(0,13) + ".."; errmsg += " \"" + s + "\""; } - errmsg += " directly or indirectly is undefined behaviour"; + errmsg += " directly or indirectly is undefined behaviour."; reportError(callstack, Severity::error, "stringLiteralWrite", errmsg); } diff --git a/test/teststring.cpp b/test/teststring.cpp index 9f229f391..1ef319c20 100644 --- a/test/teststring.cpp +++ b/test/teststring.cpp @@ -76,13 +76,13 @@ private: " char *abc = \"abc\";\n" " abc[0] = 'a';\n" "}"); - ASSERT_EQUALS("[test.cpp:3] -> [test.cpp:2]: (error) Modifying string literal \"abc\" directly or indirectly is undefined behaviour\n", errout.str()); + ASSERT_EQUALS("[test.cpp:3] -> [test.cpp:2]: (error) Modifying string literal \"abc\" directly or indirectly is undefined behaviour.\n", errout.str()); check("void f() {\n" " char *abc = \"abc\";\n" " *abc = 'a';\n" "}"); - ASSERT_EQUALS("[test.cpp:3] -> [test.cpp:2]: (error) Modifying string literal \"abc\" directly or indirectly is undefined behaviour\n", errout.str()); + ASSERT_EQUALS("[test.cpp:3] -> [test.cpp:2]: (error) Modifying string literal \"abc\" directly or indirectly is undefined behaviour.\n", errout.str()); check("void f() {\n" " QString abc = \"abc\";\n"