summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2014-12-17 11:32:49 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2014-12-17 11:32:49 (GMT)
commitf68eead36c0eb8f6f4e5c912dfe204c52bb7b7c5 (patch)
tree679a95436fb5a3a3729ad1e674f7e204296b96ef
parent0569a68edd58d741e46ec1e50d6dd936de77dbfa (diff)
downloadlz4-f68eead36c0eb8f6f4e5c912dfe204c52bb7b7c5.zip
lz4-f68eead36c0eb8f6f4e5c912dfe204c52bb7b7c5.tar.gz
lz4-f68eead36c0eb8f6f4e5c912dfe204c52bb7b7c5.tar.bz2
Added : -pedantic compilation option
-rw-r--r--NEWS1
-rw-r--r--lib/Makefile2
-rw-r--r--lib/lz4hc.c2
-rw-r--r--lib/xxhash.c4
-rw-r--r--programs/Makefile2
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