summaryrefslogtreecommitdiffstats
path: root/programs/fullbench.c
diff options
context:
space:
mode:
authoryann.collet.73@gmail.com <yann.collet.73@gmail.com@650e7d94-2a16-8b24-b05c-7c0b3f6821cd>2014-03-12 14:51:59 (GMT)
committeryann.collet.73@gmail.com <yann.collet.73@gmail.com@650e7d94-2a16-8b24-b05c-7c0b3f6821cd>2014-03-12 14:51:59 (GMT)
commita9d8640c1f3898cd47eb1faf22db013e8b9911db (patch)
treebf8993759a1f9685751dec833f206aee2e811348 /programs/fullbench.c
parent69dc85b8abe78246bea91a5ba1205e4c07b96a97 (diff)
downloadlz4-a9d8640c1f3898cd47eb1faf22db013e8b9911db.zip
lz4-a9d8640c1f3898cd47eb1faf22db013e8b9911db.tar.gz
lz4-a9d8640c1f3898cd47eb1faf22db013e8b9911db.tar.bz2
Makefile : library correctly compiled with -O3 switch (issue 114)
Makefile : library compilation compatible with clang Makefile : library is versioned and linked (issue 119) lz4.h : no more static inline prototypes (issue 116) man : improved header/footer (issue 111) Makefile : Use system default $(CC) & $(MAKE) variables (issue 112) xxhash : updated to r34 git-svn-id: https://lz4.googlecode.com/svn/trunk@114 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
Diffstat (limited to 'programs/fullbench.c')
-rw-r--r--programs/fullbench.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/programs/fullbench.c b/programs/fullbench.c
index c465c88..8e87019 100644
--- a/programs/fullbench.c
+++ b/programs/fullbench.c
@@ -385,9 +385,9 @@ int fullSpeedBench(char** fileNamesTable, int nbFiles)
}
// 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;
compressed_buff = (char*)malloc((size_t)compressedBuffSize);