]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
minor: fix mingw warnings: calloc argument order 4516/head
authorYann Collet <yann.collet.73@gmail.com>
Thu, 23 Oct 2025 14:01:01 +0000 (07:01 -0700)
committerYann Collet <yann.collet.73@gmail.com>
Thu, 23 Oct 2025 14:01:01 +0000 (07:01 -0700)
tests/paramgrill.c

index 869e966e05c17facd29c2da0e9746d5660f914fe..718196c9bbe142ae1ae759007b1bd278cf4d11c3 100644 (file)
@@ -1242,7 +1242,7 @@ static int createBuffers(buffers_t* buff, const char* const * const fileNamesTab
     size_t n;
     size_t totalSizeToLoad = (size_t)UTIL_getTotalFileSize(fileNamesTable, (U32)nbFiles);
     size_t benchedSize = MIN(BMK_findMaxMem(totalSizeToLoad * 3) / 3, totalSizeToLoad);
-    size_t* fileSizes = calloc(sizeof(size_t), nbFiles);
+    size_t* fileSizes = calloc(nbFiles, sizeof(size_t));
     void* srcBuffer = NULL;
     int ret = 0;
 
@@ -1457,7 +1457,7 @@ createMemoTableArray(const paramValues_t p,
                      const size_t varyLen,
                      const U32 memoTableLog)
 {
-    memoTable_t* const mtAll = (memoTable_t*)calloc(sizeof(memoTable_t),(ZSTD_STRATEGY_MAX + 1));
+    memoTable_t* const mtAll = (memoTable_t*)calloc((ZSTD_STRATEGY_MAX + 1), sizeof(memoTable_t));
     ZSTD_strategy i, stratMin = ZSTD_STRATEGY_MIN, stratMax = ZSTD_STRATEGY_MAX;
 
     if(mtAll == NULL) {
@@ -1494,7 +1494,7 @@ createMemoTableArray(const paramValues_t p,
             mtl = ((size_t)1 << memoTableLog);
         }
 
-        mtAll[i].table = (BYTE*)calloc(sizeof(BYTE), mtl);
+        mtAll[i].table = (BYTE*)calloc(mtl, sizeof(BYTE));
         mtAll[i].tableLen = mtl;
 
         if(mtAll[i].table == NULL) {