diff options
author | Yann Collet <cyan@fb.com> | 2019-04-13 00:06:53 (GMT) |
---|---|---|
committer | Yann Collet <cyan@fb.com> | 2019-04-13 00:06:53 (GMT) |
commit | 8c2429ed1fdeada3dd0c7a273e1d2abd9d98a13f (patch) | |
tree | 003de35e4d5f145bebfb36ee660d7432329b3066 /programs/util.h | |
parent | c7554c3004e11b3d706143917f33783b1a2e9a29 (diff) | |
download | lz4-8c2429ed1fdeada3dd0c7a273e1d2abd9d98a13f.zip lz4-8c2429ed1fdeada3dd0c7a273e1d2abd9d98a13f.tar.gz lz4-8c2429ed1fdeada3dd0c7a273e1d2abd9d98a13f.tar.bz2 |
some more Visual conversion warning
Diffstat (limited to 'programs/util.h')
-rw-r--r-- | programs/util.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/programs/util.h b/programs/util.h index 1385620..85ac87f 100644 --- a/programs/util.h +++ b/programs/util.h @@ -45,6 +45,7 @@ extern "C" { # include <utime.h> /* utime */ #endif #include <time.h> /* time */ +#include <limits.h> /* INT_MAX */ #include <errno.h> @@ -445,7 +446,8 @@ UTIL_STATIC int UTIL_prepareFileList(const char* dirName, char** bufStart, size_ } while (FindNextFileA(hFile, &cFile)); FindClose(hFile); - return nbFiles; + assert(nbFiles < INT_MAX); + return (int)nbFiles; } #elif defined(__linux__) || (PLATFORM_POSIX_VERSION >= 200112L) /* opendir, readdir require POSIX.1-2001 */ |