diff --git a/lib/checkstring.cpp b/lib/checkstring.cpp index 090dbeb33..f92a03cec 100644 --- a/lib/checkstring.cpp +++ b/lib/checkstring.cpp @@ -50,7 +50,7 @@ void CheckString::stringLiteralWrite() void CheckString::stringLiteralWriteError(const Token *tok) { reportError(tok, Severity::error, "stringLiteralWrite", - "Modifying string literal directly or indirectly is UB"); + "Modifying string literal directly or indirectly is undefined behaviour"); } //--------------------------------------------------------------------------- diff --git a/test/teststring.cpp b/test/teststring.cpp index 80d2dd1a9..705f97400 100644 --- a/test/teststring.cpp +++ b/test/teststring.cpp @@ -102,13 +102,13 @@ private: " char *abc = \"abc\";\n" " abc[0] = 'a';\n" "}"); - ASSERT_EQUALS("[test.cpp:3]: (error) Modifying string literal directly or indirectly is UB\n", errout.str()); + ASSERT_EQUALS("[test.cpp:3]: (error) Modifying string literal 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]: (error) Modifying string literal directly or indirectly is UB\n", errout.str()); + ASSERT_EQUALS("[test.cpp:3]: (error) Modifying string literal directly or indirectly is undefined behaviour\n", errout.str()); check("void f() {\n" " char *abc = \"abc\";\n"