From d2e667ae7bebf786bbef6ad2455a392e2ef45d0f Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Tue, 18 Oct 2016 15:45:08 +0300 Subject: [PATCH] Put apostrophes consistent with other similar messages --- lib/checkclass.cpp | 2 +- test/testclass.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/checkclass.cpp b/lib/checkclass.cpp index 729295cbd..1257f27d9 100644 --- a/lib/checkclass.cpp +++ b/lib/checkclass.cpp @@ -384,7 +384,7 @@ void CheckClass::noCopyConstructorError(const Token *tok, const std::string &cla { // The constructor might be intentionally missing. Therefore this is not a "warning" reportError(tok, Severity::style, "noCopyConstructor", - "'" + std::string(isStruct ? "struct" : "class") + " " + classname + + std::string(isStruct ? "struct" : "class") + " '" + classname + "' does not have a copy constructor which is recommended since the class contains a pointer to allocated memory.", CWE398, false); } diff --git a/test/testclass.cpp b/test/testclass.cpp index b561b43c3..39919d85a 100644 --- a/test/testclass.cpp +++ b/test/testclass.cpp @@ -530,7 +530,7 @@ private: " d=(char*)malloc(100);\n" " }\n" "};"); - ASSERT_EQUALS("[test.cpp:1]: (style) 'class F' does not have a copy constructor which is recommended since the class contains a pointer to allocated memory.\n", errout.str()); + ASSERT_EQUALS("[test.cpp:1]: (style) class 'F' does not have a copy constructor which is recommended since the class contains a pointer to allocated memory.\n", errout.str()); checkCopyConstructor("class F\n" "{\n" @@ -595,7 +595,7 @@ private: " char *p;\n" " F() : p(malloc(100)) {}\n" "};"); - ASSERT_EQUALS("[test.cpp:1]: (style) 'class F' does not have a copy constructor which is recommended since the class contains a pointer to allocated memory.\n", errout.str()); + ASSERT_EQUALS("[test.cpp:1]: (style) class 'F' does not have a copy constructor which is recommended since the class contains a pointer to allocated memory.\n", errout.str()); // #7198 checkCopyConstructor("struct F {\n"