]> granicus.if.org Git - neomutt/commitdiff
Fix a few small compiler warnings. (See #3638)
authorKevin McCarthy <kevin@8t8.us>
Thu, 23 Jul 2015 02:23:12 +0000 (19:23 -0700)
committerKevin McCarthy <kevin@8t8.us>
Thu, 23 Jul 2015 02:23:12 +0000 (19:23 -0700)
In certain configurations, unused variables and labels were causing
warnings.

Add a missing "#include <netinet/in.h>" to pop_lib.c.

imap/message.c
keymap.c
pop_lib.c

index 09e14633c740407e24ce7ab8e20279e320a52e34..3877381817cdb1db97cb14490198219e58ac8b24 100644 (file)
@@ -60,7 +60,6 @@ static char* msg_parse_flags (IMAP_HEADER* h, char* s);
 int imap_read_headers (IMAP_DATA* idata, int msgbegin, int msgend)
 {
   CONTEXT* ctx;
-  char buf[LONG_STRING];
   char *hdrreq = NULL;
   FILE *fp;
   char tempfile[_POSIX_PATH_MAX];
@@ -75,6 +74,7 @@ int imap_read_headers (IMAP_DATA* idata, int msgbegin, int msgend)
   int retval = -1;
 
 #if USE_HCACHE
+  char buf[LONG_STRING];
   unsigned int *uid_validity = NULL;
   unsigned int *puidnext = NULL;
   unsigned int uidnext = 0;
index 9dc87f0719e04041b1e5ddc16ef40403a6e78e24..1710b17d14fbf03bd8ca899f09918bf5c0c51663 100644 (file)
--- a/keymap.c
+++ b/keymap.c
@@ -456,7 +456,9 @@ int km_dokey (int menu)
     if (menu == MENU_EDITOR && tmp.ch == -2)
       continue;
 
+#ifdef USE_IMAP
   gotkey:
+#endif
     LastKey = tmp.ch;
     if (LastKey < 0)
       return -1;
index 7082d8dd9c82a908e361e87681dad505e64e0754..94d1f835e6c3f8f56bd1ba054df5f84c29909088 100644 (file)
--- a/pop_lib.c
+++ b/pop_lib.c
@@ -33,6 +33,7 @@
 #include <ctype.h>
 #include <netdb.h>
 #include <errno.h>
+#include <netinet/in.h>
 
 /* given an POP mailbox name, return host, port, username and password */
 int pop_parse_path (const char* path, ACCOUNT* acct)