mutt stable branch with some hacks
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix __attribute__((warn_unused_result)) issue in query.c

Changing to mutt_read_line() avoids -Wunused-result warning while
reading the ignored line in query protocol response.

authored by

David Champion and committed by
Kevin McCarthy
20c7b0d8 f098ac2d

+7 -4
+7 -4
query.c
··· 98 98 char *buf = NULL; 99 99 size_t buflen; 100 100 int dummy = 0; 101 - char msg[STRING]; 101 + char *msg = NULL; 102 + size_t msglen; 102 103 char *p; 103 104 pid_t thepid; 104 105 ··· 115 116 116 117 if (!quiet) 117 118 mutt_message _("Waiting for response..."); 118 - fgets (msg, sizeof (msg), fp); 119 - if ((p = strrchr (msg, '\n'))) 120 - *p = '\0'; 119 + 120 + /* The query protocol first reads one NL-terminated line. If an error 121 + * occurs, this is assumed to be an error message. Otherwise it's ignored. */ 122 + msg = mutt_read_line (msg, &msglen, fp, &dummy, 0); 121 123 while ((buf = mutt_read_line (buf, &buflen, fp, &dummy, 0)) != NULL) 122 124 { 123 125 if ((p = strtok(buf, "\t\n"))) ··· 156 158 if (!quiet) 157 159 mutt_message ("%s", msg); 158 160 } 161 + FREE (&msg); 159 162 160 163 return first; 161 164 }