Skip to content

Commit 3dcdd5f

Browse files
committed
std.cfg: Added a TODO test case
1 parent e735376 commit 3dcdd5f

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

test/cfg/std.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,17 @@
2929
#include <inttypes.h>
3030
#include <float.h>
3131

32+
size_t invalidFunctionArgStr_wcslen(void)
33+
{
34+
const wchar_t terminated0[] = L"ABCDEF49620910";
35+
const wchar_t terminated1[3] = { L'a', L'b', L'\0' };
36+
const wchar_t notTerminated[3] = { L'a', L'b', L'c' };
37+
// TODO: cppcheck-suppress invalidFunctionArgStr
38+
(void) wcslen(notTerminated);
39+
(void) wcslen(terminated0);
40+
return wcslen(terminated1);
41+
}
42+
3243
int invalidFunctionArgStr_strcpn(void)
3344
{
3445
const char str1[] = "ABCDEF49620910";

0 commit comments

Comments
 (0)