Fix compilation warnings in compose.c and init.c
authorJulien Danjou <julien@danjou.info>
Wed, 15 Nov 2006 15:17:59 +0000 (16:17 +0100)
committerPierre Habouzit <madcoder@debian.org>
Wed, 15 Nov 2006 16:06:28 +0000 (17:06 +0100)
- Use signed int
- Tag unused attribute
- Fix #ifdef -> #if defined()

Signed-off-by: Julien Danjou <julien@danjou.info>
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
compose.c
init.c
init.h

index 72e28f3..ca5704b 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -508,7 +508,8 @@ static void compose_status_line (char *buf, ssize_t buflen, MUTTMENU * menu,
  */
 int mutt_compose_menu (HEADER * msg,    /* structure for new message */
                        char *fcc,       /* where to save a copy of the message */
-                       ssize_t fcclen, HEADER * cur)
+                       ssize_t fcclen,
+                       HEADER * cur __attribute__ ((unused)))
 {                               /* current message */
   char helpstr[SHORT_STRING];
   char buf[LONG_STRING];
diff --git a/init.c b/init.c
index 583b02d..4fe7d96 100644 (file)
--- a/init.c
+++ b/init.c
@@ -1695,7 +1695,7 @@ static int check_dsn_return (const char* option __attribute__ ((unused)), unsign
 }
 
 /* check whether value for $dsn_notify would be valid */
-static int check_dsn_notify (const char* option, unsigned long p,
+static int check_dsn_notify (const char* option __attribute__ ((unused)), unsigned long p,
                              char* errbuf, ssize_t errlen) {
   list2_t* list = NULL;
   ssize_t i = 0;
@@ -2511,7 +2511,7 @@ void mutt_init (int skip_sys_rc, string_list_t * commands)
   const char *p;
   char buffer[STRING], error[STRING];
   int default_rc = 0, need_pause = 0;
-  unsigned int i;
+  int i;
   BUFFER err;
 
   p_clear(&err, 1);
diff --git a/init.h b/init.h
index 3f149ca..798c478 100644 (file)
--- a/init.h
+++ b/init.h
@@ -1342,7 +1342,7 @@ struct option_t MuttVars[] = {
    ** cache (first hit).
    */
 #endif /* HAVE_GDBM || HAVE_DB 4 */
-#if HAVE_QDBM
+#ifdef HAVE_QDBM
   { "header_cache_compress", DT_BOOL, R_NONE, OPTHCACHECOMPRESS, "no" },
   /*
   ** .pp
@@ -1425,11 +1425,11 @@ struct option_t MuttVars[] = {
    ** directory containing the madmutt documentation.\fP
    */
 #ifdef USE_HCACHE
-#if HAVE_QDBM
+#if defined(HAVE_QDBM)
   {"madmutt_hcache_backend", DT_SYS, R_NONE, 0, "qdbm" },
-#elif HAVE_GDBM
+#elif defined(HAVE_GDBM)
   {"madmutt_hcache_backend", DT_SYS, R_NONE, 0, "gdbm" },
-#elif HAVE_DB4
+#elif defined(HAVE_DB4)
   {"madmutt_hcache_backend", DT_SYS, R_NONE, 0, "db4" },
 #else
   {"madmutt_hcache_backend", DT_SYS, R_NONE, 0, "unknown" },