From 06c20252faedbc5ae1aa8fb1934ed014daf802bd Mon Sep 17 00:00:00 2001 From: Philipp Kloke Date: Sun, 18 Oct 2015 20:55:30 +0200 Subject: [PATCH] Added dot at end of stringLiteralWrite message --- lib/checkstring.cpp | 2 +- test/teststring.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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"