diff --git a/test/cfg/std.c b/test/cfg/std.c index 28574c979..81115f2f5 100644 --- a/test/cfg/std.c +++ b/test/cfg/std.c @@ -381,6 +381,17 @@ void nullpointer(int value) wscanf(L"%i", NULL); } +void nullPointer_wcsftime(wchar_t* ptr, size_t maxsize, const wchar_t* format, const struct tm* timeptr) +{ + // cppcheck-suppress nullPointer + (void)wcsftime(NULL, maxsize, format, timeptr); + // cppcheck-suppress nullPointer + (void)wcsftime(ptr, maxsize, NULL, timeptr); + // cppcheck-suppress nullPointer + (void)wcsftime(ptr, maxsize, format, NULL); + (void)wcsftime(ptr, maxsize, format, timeptr); +} + int nullPointer_wcsncmp(const wchar_t* s1, const wchar_t* s2, size_t n) { // cppcheck-suppress nullPointer @@ -4575,17 +4586,6 @@ void nullPointer_asctime_s(void) asctime_s(1, 26, tm); } -void nullPointer_wcsftime(size_t maxsize) -{ - wchar_t* ptr = 0; - wchar_t* format = 0; - struct tm* timeptr = 0; - // cppcheck-suppress nullPointer - (void)wcsftime(ptr,maxsize,format,timeptr); - // cppcheck-suppress nullPointer - (void)wcsftime(0,maxsize,0,0); -} - void nullPointer_fegetenv(void) { fenv_t* envp = 0; diff --git a/test/cfg/std.cpp b/test/cfg/std.cpp index 6e003f67b..b7273cf61 100644 --- a/test/cfg/std.cpp +++ b/test/cfg/std.cpp @@ -3545,15 +3545,15 @@ void nullPointer_asctime(void) (void)std::asctime(0); } -void nullPointer_wcsftime(size_t maxsize) +void nullPointer_wcsftime(wchar_t* ptr, size_t maxsize, const wchar_t* format, const struct tm* timeptr) { - wchar_t* ptr = 0; - wchar_t* format = 0; - struct tm* timeptr = 0; // cppcheck-suppress nullPointer - (void)std::wcsftime(ptr,maxsize,format,timeptr); + (void)std::wcsftime(NULL, maxsize, format, timeptr); // cppcheck-suppress nullPointer - (void)std::wcsftime(0,maxsize,0,0); + (void)std::wcsftime(ptr, maxsize, NULL, timeptr); + // cppcheck-suppress nullPointer + (void)std::wcsftime(ptr, maxsize, format, NULL); + (void)std::wcsftime(ptr, maxsize, format, timeptr); } void nullPointer_fegetenv(void)