diff --git a/package/gluon-web/src/Makefile b/package/gluon-web/src/Makefile
index 0fa9e03cec1ed62aafa3e2f8f8807bd40eec12e1..d1c20898fb5e06d6d4f54174d8cc0c4c7a36256a 100644
--- a/package/gluon-web/src/Makefile
+++ b/package/gluon-web/src/Makefile
@@ -1,7 +1,7 @@
 all: compile
 
 %.o: %.c
-	$(CC) $(CPPFLAGS) $(CFLAGS) -D_GNU_SOURCE -fPIC -c -o $@ $<
+	$(CC) $(CPPFLAGS) $(CFLAGS) -D_GNU_SOURCE -std=c99 -Wall -Wextra -fPIC -c -o $@ $<
 
 clean:
 	rm -f parser.so *.o
diff --git a/package/gluon-web/src/template_lmo.c b/package/gluon-web/src/template_lmo.c
index 070a53df78e290e9d92a69a4e3ea960f4852ca60..2ea85fdf61bf21510a4ca7bc89a8776dfc08bd57 100644
--- a/package/gluon-web/src/template_lmo.c
+++ b/package/gluon-web/src/template_lmo.c
@@ -27,8 +27,9 @@ static inline uint16_t get_le16(const uint8_t *d) {
 	return (((uint16_t)d[1]) << 8) | d[0];
 }
 
-static uint32_t sfh_hash(const uint8_t *data, int len)
+static uint32_t sfh_hash(const void *input, int len)
 {
+	const uint8_t *data = input;
 	uint32_t hash = len, tmp;
 
 	/* Main loop */
diff --git a/package/gluon-web/src/template_parser.c b/package/gluon-web/src/template_parser.c
index 452ace20087763b7033d56af65862e611a9d091b..1126ccd943f9ca2ca08f005da38addf122652a66 100644
--- a/package/gluon-web/src/template_parser.c
+++ b/package/gluon-web/src/template_parser.c
@@ -291,7 +291,7 @@ template_format_chunk(struct template_parser *parser, size_t *sz)
 	return s;
 }
 
-const char *template_reader(lua_State *L, void *ud, size_t *sz)
+const char *template_reader(lua_State *L __attribute__((unused)), void *ud, size_t *sz)
 {
 	struct template_parser *parser = ud;
 	int rem = parser->size - (parser->off - parser->data);
diff --git a/package/gluon-web/src/template_utils.c b/package/gluon-web/src/template_utils.c
index 10f3c6411f4626dcf3db5025cfaa06b72021833a..92245267752c0c6b93044f75f9df03e5f5c1c353 100644
--- a/package/gluon-web/src/template_utils.c
+++ b/package/gluon-web/src/template_utils.c
@@ -200,7 +200,7 @@ static inline int mb_is_illegal(unsigned char *s, int n)
 
 /* scan given source string, validate UTF-8 sequence and store result
  * in given buffer object */
-static int validate_utf8(unsigned char **s, int l, struct template_buffer *buf)
+static int validate_utf8(unsigned char **s, unsigned int l, struct template_buffer *buf)
 {
 	unsigned char *ptr = *s;
 	unsigned int o = 0, v, n;
@@ -289,7 +289,7 @@ char * pcdata(const char *s, unsigned int l)
 	for (o = 0; o < l; o++)
 	{
 		/* Invalid XML bytes */
-		if (((*ptr >= 0x00) && (*ptr <= 0x08)) ||
+		if ((*ptr <= 0x08) ||
 		    ((*ptr >= 0x0B) && (*ptr <= 0x0C)) ||
 		    ((*ptr >= 0x0E) && (*ptr <= 0x1F)) ||
 		    (*ptr == 0x7F))