From ab0862f21808e8037c7f26427de6c0dc4917655e Mon Sep 17 00:00:00 2001 From: Martin Ettl Date: Sun, 16 Aug 2015 01:09:03 +0200 Subject: [PATCH] std.cfg: Fixed travis build. Added noreturn to the assert-definition in std.cfg. Improved testing of std.cfg. --- cfg/std.cfg | 1 + test/cfg/std.cpp | 10 ++++++++++ test/testmemleak.cpp | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cfg/std.cfg b/cfg/std.cfg index 3972c5dd7..d93a8580b 100644 --- a/cfg/std.cfg +++ b/cfg/std.cfg @@ -86,6 +86,7 @@ + true diff --git a/test/cfg/std.cpp b/test/cfg/std.cpp index ba3b74821..25ac99d85 100644 --- a/test/cfg/std.cpp +++ b/test/cfg/std.cpp @@ -14,6 +14,7 @@ #include #include #include +#include void bufferAccessOutOfBounds(void) { @@ -226,3 +227,12 @@ void uninitvar_asinh(void) // cppcheck-suppress uninitvar (void)std::asinh(ld); } + +void uninitvar_wcsftime(wchar_t* ptr) +{ + size_t maxsize; + wchar_t* format; + struct tm* timeptr; + // cppcheck-suppress uninitvar + (void)std::wcsftime(ptr, maxsize, format, timeptr); +} diff --git a/test/testmemleak.cpp b/test/testmemleak.cpp index 375c12c56..d526ae4d0 100644 --- a/test/testmemleak.cpp +++ b/test/testmemleak.cpp @@ -4172,7 +4172,7 @@ private: " return 0;\n" "}" ); - ASSERT_EQUALS("[test.cpp:5]: (error) Memory leak: buff\n", errout.str()); + ASSERT_EQUALS("[test.cpp:6]: (error) Memory leak: buff\n", errout.str()); } void trac2540() {