std.cfg: Improved configuration of vfprintf()

This commit is contained in:
orbitcowboy 2022-05-08 18:06:30 +02:00
parent 1942bd5679
commit 0db793fc51
3 changed files with 15 additions and 0 deletions

View File

@ -1917,6 +1917,7 @@
<not-uninit/>
</arg>
<arg nr="2" direction="in">
<not-null/>
<not-uninit/>
<formatstr/>
</arg>

View File

@ -1613,6 +1613,13 @@ void uninitvar_fprintf(FILE *Stream, char *Format, int Argument)
(void)fprintf(Stream, Format, Argument);
}
void nullPointer_vfprintf(FILE *Stream, const char *Format, va_list Arg)
{
// cppcheck-suppress nullPointer
(void)vfprintf(Stream, NULL, Arg);
(void)vfprintf(Stream, Format, Arg);
}
void uninitvar_vfprintf(FILE *Stream, const char *Format, va_list Arg)
{
FILE *stream1, *stream2;

View File

@ -92,6 +92,13 @@ void nullPointer_qsort(void *base, std::size_t n, std::size_t size, int (*cmp)(c
std::qsort(base, n, size, qsort_cmpfunc);
}
void nullPointer_vfprintf(FILE *Stream, const char *Format, va_list Arg)
{
// cppcheck-suppress nullPointer
(void)std::vfprintf(Stream, NULL, Arg);
(void)std::vfprintf(Stream, Format, Arg);
}
void *bufferAccessOutOfBounds_memchr(void *s, int c, size_t n)
{
char buf[42]={0};