From: Pierre Habouzit Date: Tue, 27 Mar 2007 23:52:38 +0000 (+0200) Subject: damn, cflags were silent, fixing many bugs they now show. X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=commitdiff_plain;h=94c83f42e786ffbebb2ea3defcd6df95efe116f0 damn, cflags were silent, fixing many bugs they now show. Signed-off-by: Pierre Habouzit --- 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;