std.cfg: Fixed travis build. Added noreturn to the assert-definition in std.cfg. Improved testing of std.cfg.

This commit is contained in:
Martin Ettl 2015-08-16 01:09:03 +02:00
parent b2bf6cde5f
commit ab0862f218
3 changed files with 12 additions and 1 deletions

View File

@ -86,6 +86,7 @@
<!-- void assert(int expression) -->
<function name="assert">
<leak-ignore/>
<noreturn>true</noreturn>
<arg nr="1">
<not-uninit/>
</arg>

View File

@ -14,6 +14,7 @@
#include <cctype>
#include <complex>
#include <cassert>
#include <cwchar>
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);
}

View File

@ -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() {