summaryrefslogtreecommitdiffstats
path: root/programs
diff options
context:
space:
mode:
Diffstat (limited to 'programs')
-rw-r--r--programs/Makefile21
-rw-r--r--programs/bench.c4
-rw-r--r--programs/fullbench.c4
-rw-r--r--programs/fuzzer.c2
-rw-r--r--programs/lz4.12
-rw-r--r--programs/xxhash.h2
6 files changed, 17 insertions, 18 deletions
diff --git a/programs/Makefile b/programs/Makefile
index 98ed185..868c5fb 100644
--- a/programs/Makefile
+++ b/programs/Makefile
@@ -30,11 +30,11 @@
# fullbench32: Same as fullbench, but forced to compile in 32-bits mode
# ################################################################
-RELEASE=r113
+RELEASE=r114
DESTDIR=
PREFIX=/usr
-CC=gcc
-CFLAGS+= -I.. -std=c99 -Wall -W -Wundef -DLZ4_VERSION=\"$(RELEASE)\"
+CC:=$(CC)
+CFLAGS+= -I.. -std=c99 -O3 -Wall -W -Wundef -DLZ4_VERSION=\"$(RELEASE)\"
BINDIR=$(PREFIX)/bin
MANDIR=$(PREFIX)/share/man/man1
@@ -54,26 +54,25 @@ default: lz4 lz4c
all: lz4 lz4c lz4c32 fuzzer fuzzer32 fullbench fullbench32
lz4: $(LZ4DIR)/lz4.c $(LZ4DIR)/lz4hc.c bench.c xxhash.c lz4io.c lz4cli.c
- $(CC) -O3 $(CFLAGS) -DDISABLE_LZ4C_LEGACY_OPTIONS $^ -o $@$(EXT)
+ $(CC) $(CFLAGS) -DDISABLE_LZ4C_LEGACY_OPTIONS $^ -o $@$(EXT)
lz4c : $(LZ4DIR)/lz4.c $(LZ4DIR)/lz4hc.c bench.c xxhash.c lz4io.c lz4cli.c
- $(CC) -O3 $(CFLAGS) $^ -o $@$(EXT)
+ $(CC) $(CFLAGS) $^ -o $@$(EXT)
lz4c32: $(LZ4DIR)/lz4.c $(LZ4DIR)/lz4hc.c bench.c xxhash.c lz4io.c lz4cli.c
- $(CC) -m32 -O3 $(CFLAGS) $^ -o $@$(EXT)
+ $(CC) -m32 $(CFLAGS) $^ -o $@$(EXT)
fuzzer : $(LZ4DIR)/lz4.c $(LZ4DIR)/lz4hc.c fuzzer.c
- @echo fuzzer is a test tool to check lz4 integrity on target platform
- $(CC) -O3 $(CFLAGS) $^ -o $@$(EXT)
+ $(CC) $(CFLAGS) $^ -o $@$(EXT)
fuzzer32: $(LZ4DIR)/lz4.c $(LZ4DIR)/lz4hc.c fuzzer.c
- $(CC) -m32 -O3 $(CFLAGS) $^ -o $@$(EXT)
+ $(CC) -m32 $(CFLAGS) $^ -o $@$(EXT)
fullbench : $(LZ4DIR)/lz4.c $(LZ4DIR)/lz4hc.c xxhash.c fullbench.c
- $(CC) -O3 $(CFLAGS) $^ -o $@$(EXT)
+ $(CC) $(CFLAGS) $^ -o $@$(EXT)
fullbench32: $(LZ4DIR)/lz4.c $(LZ4DIR)/lz4hc.c xxhash.c fullbench.c
- $(CC) -m32 -O3 $(CFLAGS) $^ -o $@$(EXT)
+ $(CC) -m32 $(CFLAGS) $^ -o $@$(EXT)
clean:
@rm -f core *.o \
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);
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);
diff --git a/programs/fuzzer.c b/programs/fuzzer.c
index 7b06cbe..a2bd33a 100644
--- a/programs/fuzzer.c
+++ b/programs/fuzzer.c
@@ -145,7 +145,7 @@ int main() {
fflush(stdout);
if ( fgets(userInput, sizeof userInput, stdin) )
{
- if ( sscanf(userInput, "%d", &seed) == 1 ) {}
+ if ( sscanf(userInput, "%u", &seed) == 1 ) {}
else seed = FUZ_GetMilliSpan(timestamp);
}
printf("Seed = %u\n", seed);
diff --git a/programs/lz4.1 b/programs/lz4.1
index 69c58c3..298cbf6 100644
--- a/programs/lz4.1
+++ b/programs/lz4.1
@@ -7,7 +7,7 @@
.hy 0
.nr HY 0
-.TH lz4 man
+.TH lz4 "1" "2014-02-27" "lz4" "User Commands"
.SH NAME
\fBlz4\fR - Extremely fast compression algorithm
diff --git a/programs/xxhash.h b/programs/xxhash.h
index a319bcc..8491099 100644
--- a/programs/xxhash.h
+++ b/programs/xxhash.h
@@ -121,7 +121,7 @@ Memory will be freed by XXH32_digest().
*/
-int XXH32_sizeofState();
+int XXH32_sizeofState(void);
XXH_errorcode XXH32_resetState(void* state, unsigned int seed);
#define XXH32_SIZEOFSTATE 48