diff --git a/cfg/std.cfg b/cfg/std.cfg index e0a76e0a6..861ade3d9 100644 --- a/cfg/std.cfg +++ b/cfg/std.cfg @@ -4690,7 +4690,8 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun - + + false diff --git a/cfg/windows.cfg b/cfg/windows.cfg index 38beaa743..56fb37c5c 100644 --- a/cfg/windows.cfg +++ b/cfg/windows.cfg @@ -5309,7 +5309,7 @@ HFONT CreateFont( - + false diff --git a/test/cfg/std.c b/test/cfg/std.c index 464e27a73..7d249f3bd 100644 --- a/test/cfg/std.c +++ b/test/cfg/std.c @@ -3026,7 +3026,8 @@ void uninitvar_strncat(char *Ct, char *S, size_t N) (void)strncat(Ct,S,N); } -void uninitvar_strcat_s(char *Ct, size_t N, char *S) +// errno_t strcat_s(char *restrict dest, rsize_t destsz, const char *restrict src); // since C11 +errno_t uninitvar_strcat_s(char *Ct, size_t N, char *S) { char *ct; char *s; @@ -3041,7 +3042,26 @@ void uninitvar_strcat_s(char *Ct, size_t N, char *S) (void)strcat_s(Ct,n,S); // no warning is expected for - (void)strcat_s(Ct,N,S); + return strcat_s(Ct,N,S); +} + +// errno_t wcscat_s(wchar_t *restrict dest, rsize_t destsz, const wchar_t *restrict src); // since C11 +errno_t uninitvar_wcscat_s(wchar_t *Ct, rsize_t N, wchar_t *S) +{ + wchar_t *ct; + wchar_t *s; + rsize_t n; + // cppcheck-suppress uninitvar + (void)wcscat_s(ct,n,s); + // cppcheck-suppress uninitvar + (void)wcscat_s(ct,N,S); + // cppcheck-suppress uninitvar + (void)wcscat_s(Ct,N,s); + // cppcheck-suppress uninitvar + (void)wcscat_s(Ct,n,S); + + // no warning is expected for + return wcscat_s(Ct,N,S); } void uninitvar_strncat_s(char *Ct, size_t N1, char *S, size_t N2)