test std.cfg: Added a regression test for std::vsprintf(). The first argument is allowed to be a null pointer.

This commit is contained in:
orbitcowboy 2019-11-11 09:29:16 +01:00
parent 38dea4719b
commit 02adb60f08
1 changed files with 8 additions and 0 deletions

View File

@ -2900,6 +2900,14 @@ void uninitvar_vsprintf(void)
(void)std::vsprintf(s,format,arg);
}
void nullPointer_vsprintf(va_list arg,const char *format)
{
char *s = NULL;
(void)std::vsprintf(s,format,arg); // Its allowed to provide 's' as NULL pointer
// cppcheck-suppress nullPointer
(void)std::vsprintf(s,NULL,arg);
}
void uninitvar_vswprintf(void)
{
wchar_t *s;