From 24abc2c49cfe5cb6adca24c40778d606dbd727f8 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Wed, 23 May 2012 18:48:59 -0300 Subject: [PATCH] b2/: use -Wextra (and fix places where this caused trouble) --- b2/Makefile | 2 +- b2/db.c | 1 + b2/dump.c | 1 + b2/eval.c | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/b2/Makefile b/b2/Makefile index 7f099b8..0dddc0f 100644 --- a/b2/Makefile +++ b/b2/Makefile @@ -11,7 +11,7 @@ SHELL = /bin/bash -CFLAGS = -g -Wall $(shell pkg-config --cflags glib-2.0) +CFLAGS = -g -Wall -Wextra $(shell pkg-config --cflags glib-2.0) SLOPPY = -Wno-unused -Wno-implicit-function-declaration OBJS = bom.o boom.o chr.o comp.o db.o dump.o eval.o param.o relop.o \ subex.o subst.o util.o \ diff --git a/b2/db.c b/b2/db.c index 930f4c5..cb08bb3 100644 --- a/b2/db.c +++ b/b2/db.c @@ -356,6 +356,7 @@ static gboolean sel_prm_traverse(gpointer key, gpointer value, gpointer data) struct part *p = key; struct sel_prm_data *d = data; + (void) value; if (!params_match(d->param, p->param)) return FALSE; d->res = realloc(d->res, sizeof(const struct part *)*(d->n_res+1)); diff --git a/b2/dump.c b/b2/dump.c index 6b431ce..475c226 100644 --- a/b2/dump.c +++ b/b2/dump.c @@ -18,6 +18,7 @@ void dump_name(FILE *file, const struct format *fmt, const struct value *v) { + (void) fmt; fprintf(file, "%s", v->u.s); } diff --git a/b2/eval.c b/b2/eval.c index f4435ce..325940f 100644 --- a/b2/eval.c +++ b/b2/eval.c @@ -20,6 +20,7 @@ int eval_name(const struct format *fmt, const char *s, struct value *res) { + (void) fmt; res->u.s = s; return 1; }