From 8b8e5efefe2dfdfbeb3ebc7591d2c345c34552f5 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Sat, 11 Apr 2015 10:25:08 +0100 Subject: [PATCH] fixed minor sanitize warning --- programs/Makefile | 3 +-- programs/lz4io.c | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/programs/Makefile b/programs/Makefile index 1c9e4b5..97be7d9 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -61,7 +61,6 @@ endif TRAVIS_TARGET:= $(LZ4_TRAVIS_CI_ENV) TEST_FILES := COPYING TEST_TARGETS := test-native -FUZZER_TIME ?= -T20mn default: lz4 @@ -103,7 +102,7 @@ datagen : datagen.c datagencli.c $(CC) $(FLAGS) $^ -o $@$(EXT) clean: - @rm -f core *.o *.test \ + @rm -f core *.o *.test tmp* \ lz4$(EXT) lz4c$(EXT) lz4c32$(EXT) \ fullbench$(EXT) fullbench32$(EXT) \ fuzzer$(EXT) fuzzer32$(EXT) \ diff --git a/programs/lz4io.c b/programs/lz4io.c index 4071b1e..b6e678e 100644 --- a/programs/lz4io.c +++ b/programs/lz4io.c @@ -53,8 +53,8 @@ #include /* stat64 */ #include /* stat64 */ #include "lz4io.h" -#include "lz4.h" /* still required for legacy format */ -#include "lz4hc.h" /* still required for legacy format */ +#include "lz4.h" /* still required for legacy format */ +#include "lz4hc.h" /* still required for legacy format */ #include "lz4frame.h" @@ -823,7 +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) + if (end==start) end=start+1; { double seconds = (double)(end - start)/CLOCKS_PER_SEC; DISPLAYLEVEL(4, "Done in %.2f s ==> %.2f MB/s\n", seconds, (double)filesize / seconds / 1024 / 1024); -- 2.7.4