CheckMemoryLeak: Added 'scanf' and 'sscanf' to the whitelist

This commit is contained in:
Daniel Marjamäki 2010-01-18 21:58:27 +01:00
parent 32604dd55e
commit f49cc7f0ff
2 changed files with 4 additions and 2 deletions

View File

@ -49,8 +49,8 @@ static const char * const call_func_white_list[] =
, "fwrite", "getc", "if", "ioctl", "lockf", "lseek", "memchr", "memcpy"
, "memmove", "memset", "posix_fadvise", "posix_fallocate", "pread"
, "printf", "puts", "pwrite", "qsort", "read", "readahead", "readdir", "readdir_r", "readv"
, "realloc", "return", "rewind", "rewinddir", "scandir", "seekdir"
, "setbuf", "setbuffer", "setlinebuf", "setvbuf", "snprintf", "sprintf", "strcasecmp"
, "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"

View File

@ -510,6 +510,8 @@ private:
{
// whitelist..
ASSERT_EQUALS(true, CheckMemoryLeakInFunction::test_white_list("qsort"));
ASSERT_EQUALS(true, CheckMemoryLeakInFunction::test_white_list("scanf"));
ASSERT_EQUALS(true, CheckMemoryLeakInFunction::test_white_list("sscanf"));
static const char * const call_func_white_list[] =
{