summaryrefslogtreecommitdiffstats
path: root/programs/bench.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/bench.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/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);