# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1306148351 -7200
# Branch HEAD
# Node ID 919b06d8aef732f6dd375a23aac333f312d44868
# Parent  1fc2afbf9e3a0c572848e145944de8a5c1501187
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 <[email protected]>

diff -r 1fc2afbf9e3a -r 919b06d8aef7 imap/imap.c
--- a/imap/imap.c       Sun May 22 22:13:45 2011 -0700
+++ b/imap/imap.c       Mon May 23 12:59:11 2011 +0200
@@ -555,7 +555,6 @@ static char* imap_get_flags (LIST** hfla
 
 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 *c
     return -1;
   }
 
-  conn = idata->conn;
-
   ctx->magic = M_IMAP;
   ctx->data = idata;
 
@@ -1813,7 +1807,6 @@ int imap_search (CONTEXT* ctx, const 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 subs
   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 
 /* 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 dle
     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 "" */

Reply via email to