diff --git a/lib/checkmemoryleak.cpp b/lib/checkmemoryleak.cpp index 19d325592..b0771b14a 100644 --- a/lib/checkmemoryleak.cpp +++ b/lib/checkmemoryleak.cpp @@ -71,7 +71,7 @@ static const char * const call_func_white_list[] = , "setbuf", "setbuffer", "sethostname", "setlinebuf", "setlocale" ,"setvbuf", "sizeof" ,"snprintf", "sprintf", "sscanf" , "stat", "stpcpy", "strcasecmp", "strcat", "strchr", "strcmp", "strcoll" , "strcpy", "strcspn", "strdup", "stricmp", "strlen", "strncasecmp", "strncat", "strncmp" - , "strncpy", "strpbrk","strrchr", "strspn", "strstr", "strtod", "strtol", "strtoul", "strxfrm", "switch" + , "strncpy", "strpbrk","strrchr", "strspn", "strstr", "strtod", "strtok", "strtol", "strtoul", "strxfrm", "switch" , "symlink", "sync_file_range", "system", "telldir", "tempnam", "time", "typeid", "unlink" , "utime", "utimes", "vasprintf", "vfprintf", "vfscanf", "vprintf" , "vscanf", "vsnprintf", "vsprintf", "vsscanf", "while", "wordexp","write", "writev" diff --git a/test/testmemleak.cpp b/test/testmemleak.cpp index d62d4f849..c9cb1fede 100644 --- a/test/testmemleak.cpp +++ b/test/testmemleak.cpp @@ -599,11 +599,14 @@ private: , "getservbyname", "getservbyport", "glob", "index", "inet_addr", "inet_aton", "inet_network" , "initgroups", "link", "mblen", "mbstowcs", "mbtowc", "mkdir", "mkfifo", "mknod", "obstack_printf" , "obstack_vprintf", "opendir", "parse_printf_format", "pathconf", "popen", "psignal", "putenv" - , "readlink", "regcomp", "strxfrm", "wordexp", "sizeof" + , "readlink", "regcomp", "strxfrm", "wordexp", "sizeof", "strtok" }; for (unsigned int i = 0; i < (sizeof(call_func_white_list) / sizeof(char *)); ++i) - ASSERT_EQUALS(true, CheckMemoryLeakInFunction::test_white_list(call_func_white_list[i])); + { + bool ret = CheckMemoryLeakInFunction::test_white_list(call_func_white_list[i]); + ASSERT_EQUALS("", ret ? "" : call_func_white_list[i]); + } }