std.cfg: Improved configuration of vfwprintf().

This commit is contained in:
orbitcowboy 2022-05-08 18:15:22 +02:00
parent 0db793fc51
commit b847882994
3 changed files with 19 additions and 3 deletions

View File

@ -1921,7 +1921,7 @@
<not-uninit/>
<formatstr/>
</arg>
<arg nr="3"/>
<arg nr="3" direction="in"/>
</function>
<!-- int vfwprintf(FILE *stream, const wchar_t *format, va_list arg); -->
<function name="vfwprintf,std::vfwprintf">
@ -1933,9 +1933,11 @@
<not-uninit/>
</arg>
<arg nr="2" direction="in">
<not-null/>
<not-uninit/>
<formatstr/>
</arg>
<arg nr="3"/>
<arg nr="3" direction="in"/>
</function>
<!-- int fputc(int c, FILE *stream); -->
<function name="fputc,std::fputc">

View File

@ -1639,6 +1639,13 @@ void uninitvar_vfprintf(FILE *Stream, const char *Format, va_list Arg)
(void)vfprintf(Stream, Format, arg);
}
void nullPointer_vfwprintf(FILE *Stream, wchar_t *Format, va_list Arg)
{
// cppcheck-suppress nullPointer
(void)vfwprintf(Stream, NULL, Arg);
(void)vfwprintf(Stream, Format, Arg);
}
void uninitvar_vfwprintf(FILE *Stream, wchar_t *Format, va_list Arg)
{
FILE *stream1, *stream2;

View File

@ -95,10 +95,17 @@ void nullPointer_qsort(void *base, std::size_t n, std::size_t size, int (*cmp)(c
void nullPointer_vfprintf(FILE *Stream, const char *Format, va_list Arg)
{
// cppcheck-suppress nullPointer
(void)std::vfprintf(Stream, NULL, Arg);
(void)std::vfprintf(Stream, nullptr, Arg);
(void)std::vfprintf(Stream, Format, Arg);
}
void nullPointer_vfwprintf(FILE *Stream, wchar_t *Format, va_list Arg)
{
// cppcheck-suppress nullPointer
(void)std::vfwprintf(Stream, nullptr, Arg);
(void)std::vfwprintf(Stream, Format, Arg);
}
void *bufferAccessOutOfBounds_memchr(void *s, int c, size_t n)
{
char buf[42]={0};