aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
authorChristopher Li <sparse@chrisli.org>2016-09-29 00:38:31 -0700
committerChristopher Li <sparse@chrisli.org>2016-10-13 03:55:59 -0700
commit153fbd0bbbfd952c6e3c1f6494e71d6ba903f7ed (patch)
treea52d2460120282c57d4e361c705a01a63288b30a
parent7647c775497f8c0f5841051377fba8cbb495c275 (diff)
downloadsparse-dev-153fbd0bbbfd952c6e3c1f6494e71d6ba903f7ed.tar.gz
Fix warning compiling sparse-llvm
-pedantic in the llvm-config --cflags cause a lot of warning. Signed-off-by: Christopher Li <sparse@chrisli.org>
-rw-r--r--Makefile2
-rw-r--r--token.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index c7031afd..f59993f7 100644
--- a/Makefile
+++ b/Makefile
@@ -84,7 +84,7 @@ ifeq ($(shell expr "$(LLVM_VERSION)" : '[3-9]\.'),2)
LLVM_PROGS := sparse-llvm
$(LLVM_PROGS): LD := g++
LLVM_LDFLAGS := $(shell $(LLVM_CONFIG) --ldflags)
-LLVM_CFLAGS := $(shell $(LLVM_CONFIG) --cflags | sed -e "s/-DNDEBUG//g")
+LLVM_CFLAGS := $(shell $(LLVM_CONFIG) --cflags | sed -e "s/-DNDEBUG//g" | sed -e "s/-pedantic//g")
LLVM_LIBS := $(shell $(LLVM_CONFIG) --libs)
LLVM_LIBS += $(shell $(LLVM_CONFIG) --system-libs 2>/dev/null)
PROGRAMS += $(LLVM_PROGS)
diff --git a/token.h b/token.h
index af66b2b8..f7d88eb4 100644
--- a/token.h
+++ b/token.h
@@ -230,7 +230,7 @@ extern struct token * tokenize_buffer(void *, unsigned long, struct token **);
extern void show_identifier_stats(void);
extern struct token *preprocess(struct token *);
-static inline int match_op(struct token *token, int op)
+static inline int match_op(struct token *token, unsigned int op)
{
return token->pos.type == TOKEN_SPECIAL && token->special == op;
}