summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2015-04-10 13:24:13 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2015-04-10 13:24:13 (GMT)
commita2864fd49d801fb8a132fada94d319f96ad26e96 (patch)
tree35be7f336447ec5c62ebd31ab6bc0a18fc29942a
parent33134fb6c8aff71375f2a629d4d9856a28d930d6 (diff)
downloadlz4-a2864fd49d801fb8a132fada94d319f96ad26e96.zip
lz4-a2864fd49d801fb8a132fada94d319f96ad26e96.tar.gz
lz4-a2864fd49d801fb8a132fada94d319f96ad26e96.tar.bz2
Fixed a few minor sanitize warnings
-rw-r--r--programs/Makefile6
-rw-r--r--programs/lz4io.c5
2 files changed, 5 insertions, 6 deletions
diff --git a/programs/Makefile b/programs/Makefile
index 9585c9f..a394d4b 100644
--- a/programs/Makefile
+++ b/programs/Makefile
@@ -197,11 +197,11 @@ test-lz4: lz4 datagen test-lz4-sparse test-lz4-contentSize test-lz4-frame-concat
./datagen -g16KB | ./lz4 -9 | ./lz4 -t
./datagen | ./lz4 | ./lz4 -t
./datagen -g6M -P99 | ./lz4 -9BD | ./lz4 -t
- ./datagen -g17M | ./lz4 -9v | ./lz4 -tq
+ ./datagen -g17M | ./lz4 -9v | ./lz4 -qt
./datagen -g33M | ./lz4 --no-frame-crc | ./lz4 -t
./datagen -g256MB | ./lz4 -vqB4D | ./lz4 -t
- ./datagen -g6GB | ./lz4 -vqB5D | ./lz4 -t
- ./datagen -g6GB | ./lz4 -vq9BD | ./lz4 -t
+ ./datagen -g6GB | ./lz4 -vqB5D | ./lz4 -qt
+ ./datagen -g6GB | ./lz4 -vq9BD | ./lz4 -qt
@echo ---- test multiple input files ----
@./datagen -s1 > file1
@./datagen -s2 > file2
diff --git a/programs/lz4io.c b/programs/lz4io.c
index 278b766..4071b1e 100644
--- a/programs/lz4io.c
+++ b/programs/lz4io.c
@@ -493,11 +493,9 @@ int LZ4IO_compressFilename(const char* input_filename, const char* output_filena
}
else
{
+ double seconds = (double)(end - start)/CLOCKS_PER_SEC;
DISPLAYLEVEL(2, "Compressed %llu bytes into %llu bytes ==> %.2f%%\n",
(unsigned long long) filesize, (unsigned long long) compressedfilesize, (double)compressedfilesize/filesize*100);
- }
- {
- double seconds = (double)(end - start)/CLOCKS_PER_SEC;
DISPLAYLEVEL(4, "Done in %.2f s ==> %.2f MB/s\n", seconds, (double)filesize / seconds / 1024 / 1024);
}
@@ -825,6 +823,7 @@ int LZ4IO_decompressFilename(const char* input_filename, const char* output_file
end = clock();
DISPLAYLEVEL(2, "\r%79s\r", "");
DISPLAYLEVEL(2, "Successfully decoded %llu bytes \n", filesize);
+ if (filesize > 0)
{
double seconds = (double)(end - start)/CLOCKS_PER_SEC;
DISPLAYLEVEL(4, "Done in %.2f s ==> %.2f MB/s\n", seconds, (double)filesize / seconds / 1024 / 1024);