std.cfg: Improved tests for setbuf().

This commit is contained in:
orbitcowboy 2022-04-27 09:21:09 +02:00
parent fa351e010b
commit 561e21e2aa
1 changed files with 10 additions and 2 deletions

View File

@ -3112,12 +3112,20 @@ void uninitvar_vwscanf(void)
(void)vwscanf(format,arg); (void)vwscanf(format,arg);
} }
void nullPointer_setbuf(FILE *stream, char *buf)
{
// cppcheck-suppress nullPointer
setbuf(NULL,buf);
setbuf(stream,NULL);
setbuf(stream,buf);
}
void uninitvar_setbuf(void) void uninitvar_setbuf(void)
{ {
FILE *stream; FILE *stream;
char *buf; char *buf;
// cppcheck-suppress uninitvar // cppcheck-suppress uninitvar
(void)setbuf(stream,buf); setbuf(stream,buf);
} }
void uninitvar_setvbuf(void) void uninitvar_setvbuf(void)