From f68eead36c0eb8f6f4e5c912dfe204c52bb7b7c5 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Wed, 17 Dec 2014 12:32:49 +0100 Subject: Added : -pedantic compilation option --- NEWS | 1 + lib/Makefile | 2 +- lib/lz4hc.c | 2 +- lib/xxhash.c | 4 ++-- programs/Makefile | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index bf7efe9..8aeab1b 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ Fixed : GCC 4.9 bug on highest performance settings, reported by Greg Slazinski Fixed : bug within LZ4 HC streaming mode, reported by James Boyle Fixed : older compiler don't like nameless unions, reported by Cheyi Lin Changed : lz4 is C90 compatible +Changed : added -pedantic option, fixed a few mminor warnings r125: Changed : endian and alignment code diff --git a/lib/Makefile b/lib/Makefile index 2c85ed8..faffb39 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -41,7 +41,7 @@ LIBVER=$(LIBVER_MAJOR).$(LIBVER_MINOR).$(LIBVER_PATCH) DESTDIR?= PREFIX ?= /usr CFLAGS ?= -O3 -CFLAGS += -I. -std=c99 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Wstrict-prototypes +CFLAGS += -I. -std=c99 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -pedantic LIBDIR?= $(PREFIX)/lib INCLUDEDIR=$(PREFIX)/include diff --git a/lib/lz4hc.c b/lib/lz4hc.c index e453e35..5549969 100644 --- a/lib/lz4hc.c +++ b/lib/lz4hc.c @@ -587,7 +587,7 @@ int LZ4_compressHC_limitedOutput_withStateHC (void* state, const char* source, c * ************************************/ /* allocation */ LZ4_streamHC_t* LZ4_createStreamHC(void) { return (LZ4_streamHC_t*)malloc(sizeof(LZ4_streamHC_t)); } -int LZ4_freeStreamHC (LZ4_streamHC_t* LZ4_streamHCPtr) { free(LZ4_streamHCPtr); return 0; }; +int LZ4_freeStreamHC (LZ4_streamHC_t* LZ4_streamHCPtr) { free(LZ4_streamHCPtr); return 0; } /* initialization */ diff --git a/lib/xxhash.c b/lib/xxhash.c index a3ee31c..093564c 100644 --- a/lib/xxhash.c +++ b/lib/xxhash.c @@ -542,7 +542,7 @@ XXH_errorcode XXH32_freeState(XXH32_state_t* statePtr) { XXH_free(statePtr); return XXH_OK; -}; +} XXH64_state_t* XXH64_createState(void) { @@ -553,7 +553,7 @@ XXH_errorcode XXH64_freeState(XXH64_state_t* statePtr) { XXH_free(statePtr); return XXH_OK; -}; +} /*** Hash feed ***/ diff --git a/programs/Makefile b/programs/Makefile index 02052ea..543eb7c 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -36,7 +36,7 @@ RELEASE?= r126 DESTDIR?= PREFIX ?= /usr CFLAGS ?= -O3 -CFLAGS += -std=c99 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -DLZ4_VERSION=\"$(RELEASE)\" +CFLAGS += -std=c99 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -pedantic -DLZ4_VERSION=\"$(RELEASE)\" FLAGS = -I../lib $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) BINDIR=$(PREFIX)/bin -- cgit v0.12