Commit 3b97c101 authored by Olaf Hering's avatar Olaf Hering

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's avatarOlaf Hering <olaf@aepfle.de>
parent 75202d4d
......@@ -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 "" */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment