<<< Date Index >>>     <<< Thread Index >>>

For 1.5.10: remove unused functions



Building mutt to test the previous patch, I noticed some warnings about
unused functions. I couldn't find any code which used them, and mutt still
builds, links and runs for me even with them removed. If someone knows why
they should remain, let us know.

Patch attached.

-- 
Paul
diff -urN --exclude='*.o' -x patchlist.c -x mutt -x configure -x tags -x 
'config.*' -x '*.swp' -x '*Makefile' mutt/init.c mutt.tidy/init.c
--- mutt/init.c 2005-02-13 00:42:33.000000000 +0000
+++ mutt.tidy/init.c    2005-03-19 15:12:22.000000000 +0000
@@ -585,42 +585,6 @@
   return 0;
 }
 
-static int _parse_rx_list (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER 
*err, int flags)
-{
-  do 
-  {
-    mutt_extract_token (buf, s, 0);
-    if (add_to_rx_list ((RX_LIST **) data, buf->data, flags, err) != 0)
-      return -1;
-       
-  }
-  while (MoreArgs (s));
-  
-  return 0;
-}
-
-static int parse_rx_list (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER 
*err)
-{
-  return _parse_rx_list (buf, s, data, err, REG_ICASE);
-}
-
-static int parse_rx_unlist (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER 
*err)
-{
-  do
-  {
-    mutt_extract_token (buf, s, 0);
-    if (mutt_strcmp (buf->data, "*") == 0)
-    {
-      mutt_free_rx_list ((RX_LIST **) data);
-      break;
-    }
-    remove_from_rx_list ((RX_LIST **) data, buf->data);
-  }
-  while (MoreArgs (s));
-  
-  return 0;
-}
-
 static void _alternates_clean (void)
 {
   int i;
diff -urN --exclude='*.o' -x patchlist.c -x mutt -x configure -x tags -x 
'config.*' -x '*.swp' -x '*Makefile' mutt/init.h mutt.tidy/init.h
--- mutt/init.h 2005-03-03 20:44:57.000000000 +0000
+++ mutt.tidy/init.h    2005-03-19 15:18:35.000000000 +0000
@@ -2885,10 +2885,8 @@
 /* functions used to parse commands in a rc file */
 
 static int parse_list (BUFFER *, BUFFER *, unsigned long, BUFFER *);
-static int parse_rx_list (BUFFER *, BUFFER *, unsigned long, BUFFER *);
 static int parse_spam_list (BUFFER *, BUFFER *, unsigned long, BUFFER *);
 static int parse_unlist (BUFFER *, BUFFER *, unsigned long, BUFFER *);
-static int parse_rx_unlist (BUFFER *, BUFFER *, unsigned long, BUFFER *);
 
 static int parse_lists (BUFFER *, BUFFER *, unsigned long, BUFFER *);
 static int parse_unlists (BUFFER *, BUFFER *, unsigned long, BUFFER *);

Attachment: signature.asc
Description: Digital signature