[PATCH] Fix multiple compilation warnings
[apps/madmutt.git] / hook.c
diff --git a/hook.c b/hook.c
index 7347070..fb74206 100644 (file)
--- a/hook.c
+++ b/hook.c
@@ -36,7 +36,7 @@
 #define ERROR_STOP      0
 
 typedef struct hook {
 #define ERROR_STOP      0
 
 typedef struct hook {
-  int type;                     /* hook type */
+  unsigned long type;           /* hook type */
   rx_t rx;                      /* regular expression */
   char *command;                /* filename, command or pattern to execute */
   pattern_t *pattern;           /* used for fcc,save,send-hook */
   rx_t rx;                      /* regular expression */
   char *command;                /* filename, command or pattern to execute */
   pattern_t *pattern;           /* used for fcc,save,send-hook */
@@ -45,9 +45,9 @@ typedef struct hook {
 
 static HOOK *Hooks = NULL;
 
 
 static HOOK *Hooks = NULL;
 
-static int current_hook_type = 0;
+static unsigned long current_hook_type = 0;
 
 
-int mutt_parse_hook (BUFFER * buf, BUFFER * s, unsigned long data,
+int mutt_parse_hook (BUFFER * buf __attribute__ ((unused)), BUFFER * s, unsigned long data,
                      BUFFER * err)
 {
   HOOK *ptr;
                      BUFFER * err)
 {
   HOOK *ptr;
@@ -216,7 +216,7 @@ static void delete_hook (HOOK * h)
 }
 
 /* Deletes all hooks of type ``type'', or all defined hooks if ``type'' is 0 */
 }
 
 /* Deletes all hooks of type ``type'', or all defined hooks if ``type'' is 0 */
-static void delete_hooks (int type)
+static void delete_hooks (unsigned long type)
 {
   HOOK *h;
   HOOK *prev;
 {
   HOOK *h;
   HOOK *prev;
@@ -239,7 +239,7 @@ static void delete_hooks (int type)
   }
 }
 
   }
 }
 
-int mutt_parse_unhook (BUFFER * buf, BUFFER * s, unsigned long data,
+int mutt_parse_unhook (BUFFER * buf, BUFFER * s, unsigned long data __attribute__ ((unused)),
                        BUFFER * err)
 {
   while (MoreArgs (s)) {
                        BUFFER * err)
 {
   while (MoreArgs (s)) {
@@ -253,7 +253,7 @@ int mutt_parse_unhook (BUFFER * buf, BUFFER * s, unsigned long data,
       delete_hooks (0);
     }
     else {
       delete_hooks (0);
     }
     else {
-      int type = mutt_get_hook_type (buf->data);
+      unsigned long type = mutt_get_hook_type (buf->data);
 
       if (!type) {
         snprintf (err->data, err->dsize,
 
       if (!type) {
         snprintf (err->data, err->dsize,
@@ -306,7 +306,7 @@ void mutt_folder_hook (char *path)
   current_hook_type = 0;
 }
 
   current_hook_type = 0;
 }
 
-char *mutt_find_hook (int type, const char *pat)
+char *mutt_find_hook (unsigned long type, const char *pat)
 {
   HOOK *tmp = Hooks;
 
 {
   HOOK *tmp = Hooks;
 
@@ -318,7 +318,7 @@ char *mutt_find_hook (int type, const char *pat)
   return (NULL);
 }
 
   return (NULL);
 }
 
-void mutt_message_hook (CONTEXT * ctx, HEADER * hdr, int type)
+void mutt_message_hook (CONTEXT * ctx, HEADER * hdr, unsigned long type)
 {
   BUFFER err, token;
   HOOK *hook;
 {
   BUFFER err, token;
   HOOK *hook;
@@ -350,7 +350,7 @@ void mutt_message_hook (CONTEXT * ctx, HEADER * hdr, int type)
 }
 
 static int
 }
 
 static int
-mutt_addr_hook (char *path, size_t pathlen, int type, CONTEXT * ctx,
+mutt_addr_hook (char *path, size_t pathlen, unsigned long type, CONTEXT * ctx,
                 HEADER * hdr)
 {
   HOOK *hook;
                 HEADER * hdr)
 {
   HOOK *hook;