From 67a1c6817bbbf6bc6ff48033717941f7da6f483a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 8 Jan 2011 14:35:09 +0100 Subject: [PATCH] Error message: Replace " with ' around variable name --- lib/checkmemoryleak.cpp | 2 +- test/testmemleak.cpp | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/checkmemoryleak.cpp b/lib/checkmemoryleak.cpp index b28113555..a41d56369 100644 --- a/lib/checkmemoryleak.cpp +++ b/lib/checkmemoryleak.cpp @@ -333,7 +333,7 @@ void CheckMemoryLeak::memleakError(const Token *tok, const std::string &varname) void CheckMemoryLeak::memleakUponReallocFailureError(const Token *tok, const std::string &varname) { - reportErr(tok, Severity::error, "memleakOnRealloc", "Common realloc mistake: \"" + varname + "\" nulled but not freed upon failure"); + reportErr(tok, Severity::error, "memleakOnRealloc", "Common realloc mistake: \'" + varname + "\' nulled but not freed upon failure"); } void CheckMemoryLeak::resourceLeakError(const Token *tok, const std::string &varname) diff --git a/test/testmemleak.cpp b/test/testmemleak.cpp index f94228523..9a702c135 100644 --- a/test/testmemleak.cpp +++ b/test/testmemleak.cpp @@ -1107,7 +1107,7 @@ private: " ;\n" " free(buf);\n" "}\n"); - ASSERT_EQUALS("[test.cpp:6]: (error) Common realloc mistake: \"buf\" nulled but not freed upon failure\n", errout.str()); + ASSERT_EQUALS("[test.cpp:6]: (error) Common realloc mistake: \'buf\' nulled but not freed upon failure\n", errout.str()); } void if11() @@ -1177,7 +1177,7 @@ private: " return a;\n" "}\n"); TODO_ASSERT_EQUALS("[test.cpp:10]: (error) Memory leak: a\n", errout.str()); - ASSERT_EQUALS("[test.cpp:8]: (error) Common realloc mistake: \"a\" nulled but not freed upon failure\n", errout.str()); + ASSERT_EQUALS("[test.cpp:8]: (error) Common realloc mistake: \'a\' nulled but not freed upon failure\n", errout.str()); } @@ -1198,7 +1198,7 @@ private: "\n" " return a;\n" "}\n", true); - ASSERT_EQUALS("[test.cpp:9]: (error) Common realloc mistake: \"a\" nulled but not freed upon failure\n", errout.str()); + ASSERT_EQUALS("[test.cpp:9]: (error) Common realloc mistake: \'a\' nulled but not freed upon failure\n", errout.str()); } @@ -1219,7 +1219,7 @@ private: "\n" " return a;\n" "}\n", true); - ASSERT_EQUALS("[test.cpp:9]: (error) Common realloc mistake: \"a\" nulled but not freed upon failure\n" + ASSERT_EQUALS("[test.cpp:9]: (error) Common realloc mistake: \'a\' nulled but not freed upon failure\n" "[test.cpp:11]: (error) Memory leak: a\n", errout.str()); } @@ -2033,7 +2033,7 @@ private: " char *a = (char *)malloc(10);\n" " a = realloc(a, 100);\n" "}\n"); - ASSERT_EQUALS("[test.cpp:4]: (error) Common realloc mistake: \"a\" nulled but not freed upon failure\n" + ASSERT_EQUALS("[test.cpp:4]: (error) Common realloc mistake: \'a\' nulled but not freed upon failure\n" "[test.cpp:5]: (error) Memory leak: a\n", errout.str()); } @@ -2046,7 +2046,7 @@ private: " free(a);\n" "}\n"); - ASSERT_EQUALS("[test.cpp:4]: (error) Common realloc mistake: \"a\" nulled but not freed upon failure\n", errout.str()); + ASSERT_EQUALS("[test.cpp:4]: (error) Common realloc mistake: \'a\' nulled but not freed upon failure\n", errout.str()); } void realloc3() @@ -2073,7 +2073,7 @@ private: "}\n"); TODO_ASSERT_EQUALS("[test.cpp:5]: (error) Memory leak: a\n", errout.str()); - ASSERT_EQUALS("[test.cpp:4]: (error) Common realloc mistake: \"a\" nulled but not freed upon failure\n", errout.str()); + ASSERT_EQUALS("[test.cpp:4]: (error) Common realloc mistake: \'a\' nulled but not freed upon failure\n", errout.str()); } void realloc5()