]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Removed unused code.
authorTimo Sirainen <tss@iki.fi>
Tue, 24 Mar 2009 17:06:31 +0000 (13:06 -0400)
committerTimo Sirainen <tss@iki.fi>
Tue, 24 Mar 2009 17:06:31 +0000 (13:06 -0400)
Based on coccinelle output from Diego Liziero.

--HG--
branch : HEAD

src/lib-storage/index/maildir/maildir-copy.c
src/lib/file-dotlock.c
src/lib/istream-crlf.c

index e5033d2fd20aa81fa334bdda4694b7e7e5a7f09d..a3f7c0e5bbb4edfc2c8f980a585e2885a405e3a0 100644 (file)
@@ -133,7 +133,6 @@ maildir_copy_hardlink(struct maildir_transaction_context *t, struct mail *mail,
        struct maildir_mailbox *dest_mbox =
                (struct maildir_mailbox *)t->ictx.ibox;
        struct maildir_mailbox *src_mbox;
-       struct maildir_save_context *ctx;
        struct hardlink_ctx do_ctx;
        const char *path, *filename = NULL;
        uint32_t seq;
@@ -152,7 +151,6 @@ maildir_copy_hardlink(struct maildir_transaction_context *t, struct mail *mail,
 
        if (t->save_ctx == NULL)
                t->save_ctx = maildir_save_transaction_init(t);
-       ctx = t->save_ctx;
 
        /* don't allow caller to specify recent flag */
        flags &= ~MAIL_RECENT;
@@ -239,15 +237,15 @@ maildir_copy_hardlink(struct maildir_transaction_context *t, struct mail *mail,
 #if 0
        if (keywords == NULL || keywords->count == 0) {
                /* hardlinked to destination, set hardlinked-flag */
-               seq = maildir_save_add(t, do_ctx.dest_fname,
-                                      flags | MAILDIR_SAVE_FLAG_HARDLINK, NULL,
-                                      dest_mail);
+               maildir_save_add(t, do_ctx.dest_fname,
+                                flags | MAILDIR_SAVE_FLAG_HARDLINK, NULL,
+                                dest_mail);
        } else
 #endif
 {
                /* hardlinked to tmp/, treat as normal copied mail */
-               seq = maildir_save_add(t, do_ctx.dest_fname, flags, keywords,
-                                      dest_mail);
+               maildir_save_add(t, do_ctx.dest_fname, flags, keywords,
+                                dest_mail);
        }
        return 1;
 }
index 300ed91ceb2756bbfef7a32114a9119ca9ea054a..9bcc2b987e758767953e4056980938258c497c37 100644 (file)
@@ -793,12 +793,10 @@ int file_dotlock_replace(struct dotlock **dotlock_p,
 {
        struct dotlock *dotlock;
        const char *lock_path;
-       int fd;
 
        dotlock = *dotlock_p;
        *dotlock_p = NULL;
 
-       fd = dotlock->fd;
        if ((flags & DOTLOCK_REPLACE_FLAG_DONT_CLOSE_FD) != 0)
                dotlock->fd = -1;
 
index ec60ef2951f728f01927063d26b3ac5161ddf0c8..c466f16a0a993030c5c0c54ba24353df855deda6 100644 (file)
@@ -32,11 +32,10 @@ i_stream_crlf_set_max_buffer_size(struct iostream_private *stream,
 static int i_stream_crlf_read_common(struct crlf_istream *cstream)
 {
        struct istream_private *stream = &cstream->istream;
-       const unsigned char *data;
        size_t size;
        ssize_t ret;
 
-       data = i_stream_get_data(stream->parent, &size);
+       (void)i_stream_get_data(stream->parent, &size);
        if (size == 0) {
                ret = i_stream_read(stream->parent);
                if (ret <= 0 && (ret != -2 || stream->skip == 0)) {
@@ -45,7 +44,7 @@ static int i_stream_crlf_read_common(struct crlf_istream *cstream)
                        stream->istream.eof = stream->parent->eof;
                        return ret;
                }
-               data = i_stream_get_data(stream->parent, &size);
+               (void)i_stream_get_data(stream->parent, &size);
                i_assert(size != 0);
        }