Compile with -Wall -Werror - this could have saved us from some bugs...

parent 6fc0f106
AM_CFLAGS = $(VARNISHAPI_CFLAGS) DEV_CFLAGS = -Wall -Werror
AM_CFLAGS = $(VARNISHAPI_CFLAGS) $(DEV_CFLAGS)
# ---------------------------------------- # ----------------------------------------
# get header from ext vmod # get header from ext vmod
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
-esym(765, tus_files_VSPLAY_*) -esym(765, tus_files_VSPLAY_*)
-esym(768, Vmod_vmod_*_Func::*) -esym(768, Vmod_vmod_*_Func::*)
-efile(766, *_if.c) -efile(766, *_if.c)
-esym(528, avoid_compiler_warnings)
-esym(528, vmod_priv_blob*, VGC_*) -esym(528, vmod_priv_blob*, VGC_*)
-esym(843, vmod_priv_blob*, VGC_*) -esym(843, vmod_priv_blob*, VGC_*)
-esym(844, vmod_priv_blob*, VGC_*) -esym(844, vmod_priv_blob*, VGC_*)
......
...@@ -42,6 +42,15 @@ ...@@ -42,6 +42,15 @@
#include "tus_blob.h" #include "tus_blob.h"
#include "tus_checksums.h" #include "tus_checksums.h"
//avoid defined but not used
static inline void
avoid_compiler_warnings(void) {
(void)vmod_priv_blobdigest;
(void)VGC_vmod_blobdigest;
(void)vmod_priv_blob;
(void)VGC_vmod_blob;
}
static const struct Vmod_vmod_blob_Func *vmod_blob = NULL; static const struct Vmod_vmod_blob_Func *vmod_blob = NULL;
static const struct Vmod_vmod_blobdigest_Func *vmod_blobdigest = NULL; static const struct Vmod_vmod_blobdigest_Func *vmod_blobdigest = NULL;
static void *dl_vmod_blob = NULL; static void *dl_vmod_blob = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment