# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1306148352 -7200
# Branch HEAD
# Node ID 92b202b0e724ff6a80be8c10de4125866416e002
# Parent  9ac9a31991d291981eaa497e17bcf0fc77998905
fix gcc 4.6 warning -Wunused-but-set-variable in parse.c

parse.c: In function 'mutt_read_rfc822_header':
parse.c:1320:7: warning: variable 'matched' set but not used 
[-Wunused-but-set-variable]

Since the return value of mutt_parse_rfc822_line() is not used,
update its prototype to return void.

Signed-off-by: Olaf Hering <[email protected]>

diff -r 9ac9a31991d2 -r 92b202b0e724 parse.c
--- a/parse.c   Mon May 23 12:59:11 2011 +0200
+++ b/parse.c   Mon May 23 12:59:12 2011 +0200
@@ -966,7 +966,7 @@ void mutt_parse_mime_message (CONTEXT *c
   cur->attach_valid = 0;
 }
 
-int mutt_parse_rfc822_line (ENVELOPE *e, HEADER *hdr, char *line, char *p, 
short user_hdrs, short weed,
+void mutt_parse_rfc822_line (ENVELOPE *e, HEADER *hdr, char *line, char *p, 
short user_hdrs, short weed,
                            short do_2047, LIST **lastp)
 {
   int matched = 0;
@@ -1287,7 +1287,6 @@ int mutt_parse_rfc822_line (ENVELOPE *e,
   done:
   
   *lastp = last;
-  return matched;
 }
   
   
@@ -1317,7 +1316,6 @@ ENVELOPE *mutt_read_rfc822_header (FILE 
   char *line = safe_malloc (LONG_STRING);
   char *p;
   LOFF_T loc;
-  int matched;
   size_t linelen = LONG_STRING;
   char buf[LONG_STRING+1];
 
@@ -1341,8 +1339,6 @@ ENVELOPE *mutt_read_rfc822_header (FILE 
   while ((loc = ftello (f)),
          *(line = mutt_read_rfc822_line (f, line, &linelen)) != 0)
   {
-    matched = 0;
-
     if ((p = strpbrk (line, ": \t")) == NULL || *p != ':')
     {
       char return_path[LONG_STRING];
@@ -1412,7 +1408,7 @@ ENVELOPE *mutt_read_rfc822_header (FILE 
     if (!*p)
       continue; /* skip empty header fields */
 
-    matched = mutt_parse_rfc822_line (e, hdr, line, p, user_hdrs, weed, 1, 
&last);
+    mutt_parse_rfc822_line (e, hdr, line, p, user_hdrs, weed, 1, &last);
     
   }
 
diff -r 9ac9a31991d2 -r 92b202b0e724 protos.h
--- a/protos.h  Mon May 23 12:59:11 2011 +0200
+++ b/protos.h  Mon May 23 12:59:12 2011 +0200
@@ -335,7 +335,7 @@ int mutt_parse_mono (BUFFER *, BUFFER *,
 int mutt_parse_unmono (BUFFER *, BUFFER *, unsigned long, BUFFER *);
 int mutt_parse_push (BUFFER *, BUFFER *, unsigned long, BUFFER *);
 int mutt_parse_rc_line (/* const */ char *, BUFFER *, BUFFER *);
-int mutt_parse_rfc822_line (ENVELOPE *e, HEADER *hdr, char *line, char *p,
+void mutt_parse_rfc822_line (ENVELOPE *e, HEADER *hdr, char *line, char *p,
   short user_hdrs, short weed, short do_2047, LIST **lastp);
 int mutt_parse_score (BUFFER *, BUFFER *, unsigned long, BUFFER *);
 int mutt_parse_unscore (BUFFER *, BUFFER *, unsigned long, BUFFER *);

Reply via email to