From 7e3ac96ebc872c33039f4cca3029fefc3e6beb8d Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Tue, 26 Apr 2022 17:50:59 +0200 Subject: [PATCH] std.cfg: Improved tests of vswprintf(). --- test/cfg/std.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/cfg/std.c b/test/cfg/std.c index bd6a93448..b08b1e407 100644 --- a/test/cfg/std.c +++ b/test/cfg/std.c @@ -4097,6 +4097,15 @@ void valid_vsprintf() valid_vsprintf_helper("%1.0f", 2.0f); } +int nullPointer_vswprintf(wchar_t* restrict ws, size_t s, const wchar_t* restrict format, va_list ap) +{ + // cppcheck-suppress nullPointer + vswprintf(NULL, s,format, ap); + // cppcheck-suppress nullPointer + vswprintf(ws, s,NULL, ap); + return vswprintf(ws, s,format, ap); +} + void uninitvar_vswprintf(void) { wchar_t *s;