summaryrefslogtreecommitdiffstats
path: root/programs/bench.c
diff options
context:
space:
mode:
Diffstat (limited to 'programs/bench.c')
-rw-r--r--programs/bench.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/programs/bench.c b/programs/bench.c
index ea6a1ca..2eabf61 100644
--- a/programs/bench.c
+++ b/programs/bench.c
@@ -300,9 +300,9 @@ int BMK_benchFile(char** fileNamesTable, int nbFiles, int cLevel)
}
// Alloc
- chunkP = (struct chunkParameters*) malloc(((benchedSize / chunkSize)+1) * sizeof(struct chunkParameters));
+ chunkP = (struct chunkParameters*) malloc(((benchedSize / (size_t)chunkSize)+1) * sizeof(struct chunkParameters));
orig_buff = (char*)malloc((size_t )benchedSize);
- nbChunks = (int) (benchedSize / chunkSize) + 1;
+ nbChunks = (int) ((int)benchedSize / chunkSize) + 1;
maxCompressedChunkSize = LZ4_compressBound(chunkSize);
compressedBuffSize = nbChunks * maxCompressedChunkSize;
compressedBuffer = (char*)malloc((size_t )compressedBuffSize);