Fixed #1293 (Things to add to call_func_white_list)
This commit is contained in:
parent
3447030564
commit
a6e81c2ee7
|
@ -39,21 +39,26 @@ CheckMemoryLeakInClass instance2;
|
|||
CheckMemoryLeakStructMember instance3;
|
||||
}
|
||||
|
||||
|
||||
// This list needs to be alphabetically sorted so we can run bsearch on it
|
||||
static const char * const call_func_white_list[] =
|
||||
{
|
||||
"asprintf", "atof", "atoi", "atol", "clearerr", "delete", "fchmod", "fcntl"
|
||||
"asctime", "asctime_r", "asprintf", "atof", "atoi", "atol", "clearerr"
|
||||
, "ctime", "ctime_r", "delete", "fchmod", "fcntl"
|
||||
, "fdatasync", "feof", "ferror", "fflush", "fgetc", "fgetpos", "fgets"
|
||||
, "flock", "for", "fprintf", "fputc", "fputs", "fread", "free", "fscanf", "fseek"
|
||||
, "fseeko", "fsetpos", "fstat", "fsync", "ftell", "ftello", "ftruncate"
|
||||
, "fwrite", "getc", "if", "ioctl", "lockf", "lseek", "memchr", "memcpy"
|
||||
, "memmove", "memset", "posix_fadvise", "posix_fallocate", "pread"
|
||||
, "fwrite", "getc", "gets", "gmtime", "gmtime_r", "if", "ioctl"
|
||||
, "localtime", "localtime_r"
|
||||
, "lockf", "lseek", "memchr", "memcmp", "memcpy", "memmove", "memset"
|
||||
, "posix_fadvise", "posix_fallocate", "pread"
|
||||
, "printf", "puts", "pwrite", "qsort", "read", "readahead", "readdir", "readdir_r", "readv"
|
||||
, "realloc", "return", "rewind", "rewinddir", "scandir", "scanf", "seekdir"
|
||||
, "setbuf", "setbuffer", "setlinebuf", "setvbuf", "snprintf", "sprintf", "sscanf", "strcasecmp"
|
||||
, "strcat", "strchr", "strcmp", "strcpy", "stricmp", "strlen", "strncat", "strncmp"
|
||||
, "strncpy", "strrchr", "strstr", "strtod", "strtol", "strtoul", "switch"
|
||||
, "sync_file_range", "telldir", "typeid", "while", "write", "writev"
|
||||
, "sync_file_range", "telldir", "time", "typeid", "vfprintf", "vprintf"
|
||||
, "vsnprintf", "vsprintf", "while", "write", "writev"
|
||||
};
|
||||
|
||||
static int call_func_white_list_compare(const void *a, const void *b)
|
||||
|
|
|
@ -513,6 +513,24 @@ private:
|
|||
ASSERT_EQUALS(true, CheckMemoryLeakInFunction::test_white_list("scanf"));
|
||||
ASSERT_EQUALS(true, CheckMemoryLeakInFunction::test_white_list("sscanf"));
|
||||
|
||||
// #1293
|
||||
ASSERT_EQUALS(true, CheckMemoryLeakInFunction::test_white_list("time"));
|
||||
ASSERT_EQUALS(true, CheckMemoryLeakInFunction::test_white_list("asctime"));
|
||||
ASSERT_EQUALS(true, CheckMemoryLeakInFunction::test_white_list("asctime_r"));
|
||||
ASSERT_EQUALS(true, CheckMemoryLeakInFunction::test_white_list("ctime"));
|
||||
ASSERT_EQUALS(true, CheckMemoryLeakInFunction::test_white_list("ctime_r"));
|
||||
ASSERT_EQUALS(true, CheckMemoryLeakInFunction::test_white_list("gmtime"));
|
||||
ASSERT_EQUALS(true, CheckMemoryLeakInFunction::test_white_list("gmtime_r"));
|
||||
ASSERT_EQUALS(true, CheckMemoryLeakInFunction::test_white_list("localtime"));
|
||||
ASSERT_EQUALS(true, CheckMemoryLeakInFunction::test_white_list("localtime_r"));
|
||||
ASSERT_EQUALS(true, CheckMemoryLeakInFunction::test_white_list("memcmp"));
|
||||
ASSERT_EQUALS(true, CheckMemoryLeakInFunction::test_white_list("gets"));
|
||||
ASSERT_EQUALS(true, CheckMemoryLeakInFunction::test_white_list("vprintf"));
|
||||
ASSERT_EQUALS(true, CheckMemoryLeakInFunction::test_white_list("vfprintf"));
|
||||
ASSERT_EQUALS(true, CheckMemoryLeakInFunction::test_white_list("vsprintf"));
|
||||
ASSERT_EQUALS(true, CheckMemoryLeakInFunction::test_white_list("snprintf"));
|
||||
ASSERT_EQUALS(true, CheckMemoryLeakInFunction::test_white_list("vsnprintf"));
|
||||
|
||||
static const char * const call_func_white_list[] =
|
||||
{
|
||||
"asprintf", "atof", "atoi", "atol", "clearerr", "delete", "fchmod", "fcntl"
|
||||
|
|
Loading…
Reference in New Issue