From: Olaf Hering Date: Mon, 23 May 2011 10:59:11 +0000 (+0200) Subject: fix gcc 4.6 warning -Wunused-but-set-variable in imap.c X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3b97c101e89a2060d9001620a7830d781cf4022d;p=mutt fix gcc 4.6 warning -Wunused-but-set-variable in imap.c imap.c: In function 'imap_open_mailbox': imap.c:558:15: warning: variable 'conn' set but not used [-Wunused-but-set-variable] imap.c: In function 'imap_open_mailbox_append': imap.c:777:15: warning: variable 'conn' set but not used [-Wunused-but-set-variable] imap.c: In function 'imap_subscribe': imap.c:1816:15: warning: variable 'conn' set but not used [-Wunused-but-set-variable] imap.c: In function 'imap_complete': imap.c:1944:15: warning: variable 'conn' set but not used [-Wunused-but-set-variable] Signed-off-by: Olaf Hering --- diff --git a/imap/imap.c b/imap/imap.c index f08b4ead..6fb720f1 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -555,7 +555,6 @@ static char* imap_get_flags (LIST** hflags, char* s) int imap_open_mailbox (CONTEXT* ctx) { - CONNECTION *conn; IMAP_DATA *idata; IMAP_STATUS* status; char buf[LONG_STRING]; @@ -576,8 +575,6 @@ int imap_open_mailbox (CONTEXT* ctx) if (idata->state < IMAP_AUTHENTICATED) goto fail; - conn = idata->conn; - /* once again the context is new */ ctx->data = idata; ctx->mx_close = imap_close_mailbox; @@ -774,7 +771,6 @@ int imap_open_mailbox (CONTEXT* ctx) int imap_open_mailbox_append (CONTEXT *ctx) { - CONNECTION *conn; IMAP_DATA *idata; char buf[LONG_STRING]; char mailbox[LONG_STRING]; @@ -793,8 +789,6 @@ int imap_open_mailbox_append (CONTEXT *ctx) return -1; } - conn = idata->conn; - ctx->magic = M_IMAP; ctx->data = idata; @@ -1813,7 +1807,6 @@ int imap_search (CONTEXT* ctx, const pattern_t* pat) int imap_subscribe (char *path, int subscribe) { - CONNECTION *conn; IMAP_DATA *idata; char buf[LONG_STRING]; char mbox[LONG_STRING]; @@ -1829,8 +1822,6 @@ int imap_subscribe (char *path, int subscribe) if (!(idata = imap_conn_find (&(mx.account), 0))) goto fail; - conn = idata->conn; - imap_fix_path (idata, mx.mbox, buf, sizeof (buf)); if (!*buf) strfcpy (buf, "INBOX", sizeof (buf)); @@ -1941,7 +1932,6 @@ imap_complete_hosts (char *dest, size_t len) /* imap_complete: given a partial IMAP folder path, return a string which * adds as much to the path as is unique */ int imap_complete(char* dest, size_t dlen, char* path) { - CONNECTION* conn; IMAP_DATA* idata; char list[LONG_STRING]; char buf[LONG_STRING]; @@ -1966,7 +1956,6 @@ int imap_complete(char* dest, size_t dlen, char* path) { strfcpy (dest, path, dlen); return imap_complete_hosts (dest, dlen); } - conn = idata->conn; /* reformat path for IMAP list, and append wildcard */ /* don't use INBOX in place of "" */