From: Pierre Habouzit Date: Sun, 10 Dec 2006 22:17:23 +0000 (+0100) Subject: various fixes. X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=commitdiff_plain;h=e17c7e1850498e4c8a82ec06b560f8018bb0eed6 various fixes. add *_list_rev function. Signed-off-by: Pierre Habouzit --- diff --git a/lib-lib/lib-lib.h b/lib-lib/lib-lib.h index 1b0769a..a4098e2 100644 --- a/lib-lib/lib-lib.h +++ b/lib-lib/lib-lib.h @@ -20,7 +20,7 @@ #ifndef MUTT_LIB_LIB_LIB_LIB_H #define MUTT_LIB_LIB_LIB_LIB_H -#if HAVE_CONFIG_H +#ifdef HAVE_CONFIG_H # include "../config.h" #endif diff --git a/lib-lib/list.h b/lib-lib/list.h index bba82b1..957c900 100644 --- a/lib-lib/list.h +++ b/lib-lib/list.h @@ -51,6 +51,13 @@ list = prefix##_list_last(list); \ *list = item; \ return list; \ + } \ + static inline type *prefix##_list_rev(type *list) { \ + type *l = NULL; \ + while (list) { \ + prefix##_list_push(&l, prefix##_list_pop(&list)); \ + } \ + return l; \ } \ \ static inline type **prefix##_list_init(type **list) { \ diff --git a/tools/lemon.c b/tools/lemon.c index 759e1c3..00dabf0 100644 --- a/tools/lemon.c +++ b/tools/lemon.c @@ -11,6 +11,7 @@ #include #include #include +#include #ifndef __WIN32__ # if defined(_WIN32) || defined(WIN32) diff --git a/tools/lempar.c b/tools/lempar.c index 168efc4..9220588 100644 --- a/tools/lempar.c +++ b/tools/lempar.c @@ -548,9 +548,10 @@ static void yy_parse_failed( ** The following code executes when a syntax error first occurs. */ static void yy_syntax_error( - yyParser *yypParser, /* The parser */ - int yymajor, /* The major type of the error token */ - YYMINORTYPE yyminor /* The minor type of the error token */ + yyParser *yypParser, /* The parser */ + int yymajor __attribute__((unused)), /* The major type of the error token */ + YYMINORTYPE yyminor __attribute__((unused)) + /* The minor type of the error token */ ){ ParseARG_FETCH; #define TOKEN (yyminor.yy0)