From a98748a0ceb101824f1dcc33a37d44373b11fd91 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 25 Feb 2014 01:01:20 +0100 Subject: [PATCH] Use clang by default and enable more warnings. --- Makefile | 3 ++- jsproperty.c | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index bf07345..656a0c7 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,8 @@ SRCS := $(wildcard js*.c utf*.c regex.c) HDRS := $(wildcard js*.h utf.h regex.h) OBJS := $(SRCS:%.c=build/%.o) -CFLAGS = -Wall -g +CC := clang +CFLAGS := -Wall -Wextra -Wunreachable-code -Wno-unused-parameter -Werror -g default: build js re diff --git a/jsproperty.c b/jsproperty.c index 1cd256c..ed3c6d7 100644 --- a/jsproperty.c +++ b/jsproperty.c @@ -18,7 +18,14 @@ split() fixes consecutive right horizontal links. */ -static js_Property sentinel = { "", &sentinel, &sentinel, 0 }; +static js_Property sentinel = { + "", + &sentinel, &sentinel, + NULL, NULL, + 0, 0, + { 0, { 0 } }, + NULL, NULL +}; static js_Property *newproperty(js_State *J, const char *name) {