From: Yann Collet Date: Sat, 13 Apr 2019 00:03:28 +0000 (-0700) Subject: fixed minor Visual conversion warnings X-Git-Tag: upstream/1.9.3~5^2~7^2^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c7554c3004e11b3d706143917f33783b1a2e9a29;p=platform%2Fupstream%2Flz4.git fixed minor Visual conversion warnings --- diff --git a/programs/util.h b/programs/util.h index 4aba6a3..1385620 100644 --- a/programs/util.h +++ b/programs/util.h @@ -391,11 +391,11 @@ UTIL_STATIC void* UTIL_realloc(void* ptr, size_t size) UTIL_STATIC int UTIL_prepareFileList(const char* dirName, char** bufStart, size_t* pos, char** bufEnd) { char* path; - int dirLength, nbFiles = 0; + size_t dirLength, nbFiles = 0; WIN32_FIND_DATAA cFile; HANDLE hFile; - dirLength = (int)strlen(dirName); + dirLength = strlen(dirName); path = (char*) malloc(dirLength + 3); if (!path) return 0; @@ -412,7 +412,7 @@ UTIL_STATIC int UTIL_prepareFileList(const char* dirName, char** bufStart, size_ free(path); do { - int pathLength; + size_t pathLength; int const fnameLength = (int)strlen(cFile.cFileName); path = (char*) malloc(dirLength + fnameLength + 2); if (!path) { FindClose(hFile); return 0; } @@ -553,15 +553,15 @@ UTIL_createFileList(const char** inputNames, unsigned inputNamesNb, char** alloc } } else { char* bufend = buf + bufSize; - nbFiles += UTIL_prepareFileList(inputNames[i], &buf, &pos, &bufend); + nbFiles += (unsigned)UTIL_prepareFileList(inputNames[i], &buf, &pos, &bufend); if (buf == NULL) return NULL; assert(bufend > buf); - bufSize = bufend - buf; + bufSize = (size_t)(bufend - buf); } } if (nbFiles == 0) { free(buf); return NULL; } - fileTable = (const char**)malloc((nbFiles+1) * sizeof(const char*)); + fileTable = (const char**)malloc(((size_t)nbFiles+1) * sizeof(const char*)); if (!fileTable) { free(buf); return NULL; } for (i=0, pos=0; i