From 94c83f42e786ffbebb2ea3defcd6df95efe116f0 Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Wed, 28 Mar 2007 01:52:38 +0200 Subject: [PATCH] damn, cflags were silent, fixing many bugs they now show. Signed-off-by: Pierre Habouzit --- Makefile.am | 4 ++-- charset.cpkg | 4 +++- tools/cflags.mk | 1 + tools/cpkg2c.mll | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 4330ce2..e1fdf58 100644 --- a/Makefile.am +++ b/Makefile.am @@ -148,8 +148,8 @@ stamp-doc-rc: $(srcdir)/init.h makedoc Madmuttrc.head $(srcdir)/init.h | ./makedoc -c | cat Madmuttrc.head - > Madmuttrc touch $@ -include $(top_builddir)/tools/cpkg2c.mk --include $(top_buildir)/tools/cflags.mk +include tools/cpkg2c.mk +-include tools/cflags.mk wc: @sloccount $(wildcard *.h *.c) $(wildcard lib-*/) lib imap nntp pop | grep 'ansic[=:]' diff --git a/charset.cpkg b/charset.cpkg index 1ac8cea..2c8f507 100644 --- a/charset.cpkg +++ b/charset.cpkg @@ -96,11 +96,13 @@ static rx_t *iconv_hooks = NULL; void charset_hook(rx_t local, const string_t alias) { rx_set_template(local, alias); rx_list_append(&charset_hooks, local); + RETURN(); }; void iconv_hook(rx_t local, const string_t alias) { rx_set_template(local, alias); rx_list_append(&iconv_hooks, local); + RETURN(); }; }; @@ -397,7 +399,7 @@ int mutt_convert_nonmime_string(char **ps) return 0; while (*p == ':') - *p++; + p++; q = m_strchrnul(p, ':'); m_strncpy(fromcode, sizeof(fromcode), p, q - p); diff --git a/tools/cflags.mk b/tools/cflags.mk index 32e4a95..33f8b17 100644 --- a/tools/cflags.mk +++ b/tools/cflags.mk @@ -35,6 +35,7 @@ CFLAGS += -Wwrite-strings CFLAGS += -Wsign-compare # warn about unused declared stuff CFLAGS += -Wunused +CFLAGS += -Wno-unused-parameter # warn about variable use before initialization CFLAGS += -Wuninitialized # warn about variables which are initialized with themselves diff --git a/tools/cpkg2c.mll b/tools/cpkg2c.mll index 8b3105d..57e8258 100644 --- a/tools/cpkg2c.mll +++ b/tools/cpkg2c.mll @@ -423,7 +423,7 @@ and ext_bodycode buf = parse ) 0 fn.args); printf "\n#define RAISE(s) luaL_error(L, (s))\n"; if fn.rettype = [] then ( - printf "#define RETURN return luaM_ret_%s_%s(L)\n" pkg.name fn.fname + printf "#define RETURN() return luaM_ret_%s_%s(L)\n" pkg.name fn.fname ) else ( printf "#define RETURN(luaM_x1"; for i = 2 to retlen do printf ", luaM_x%d" i done; -- 2.20.1