[evolution-data-server] Stored values are never read



commit 51d3ccaf91e223ca100265bac4a4f8abe9f9ad63
Author: Дилян Палаузов <git-dpa aegee org>
Date:   Wed Oct 5 17:22:12 2022 +0000

    Stored values are never read

 src/addressbook/backends/ldap/e-book-backend-ldap.c | 10 +++-------
 src/camel/camel-mime-utils.c                        |  2 +-
 src/camel/camel-text-index.c                        |  3 ---
 src/camel/providers/imapx/camel-imapx-server.c      |  2 --
 src/camel/providers/nntp/camel-nntp-stream.c        |  1 -
 src/camel/providers/nntp/camel-nntp-summary.c       |  2 +-
 src/camel/providers/pop3/camel-pop3-folder.c        |  2 +-
 src/camel/providers/pop3/camel-pop3-stream.c        |  1 -
 src/libedataserver/e-collator.c                     |  2 +-
 src/libedataserver/e-data-server-util.c             |  3 +--
 10 files changed, 8 insertions(+), 20 deletions(-)
---
diff --git a/src/addressbook/backends/ldap/e-book-backend-ldap.c 
b/src/addressbook/backends/ldap/e-book-backend-ldap.c
index 721196adb..b4b6cf04d 100644
--- a/src/addressbook/backends/ldap/e-book-backend-ldap.c
+++ b/src/addressbook/backends/ldap/e-book-backend-ldap.c
@@ -2765,7 +2765,6 @@ member_compare (EBookBackendLDAP *self,
                        const gchar *param_name1 = e_vcard_attribute_param_get_name (param);
 
                        if (!g_ascii_strcasecmp (param_name1, EVC_X_DEST_CONTACT_UID)) {
-                               gboolean found = FALSE;
                                GList *v = e_vcard_attribute_param_get_values (param);
                                dn_new = v ? v->data : NULL;
                                if (dn_new) {
@@ -2783,7 +2782,6 @@ member_compare (EBookBackendLDAP *self,
 
                                                                if (dn_cur) {
                                                                        if (!g_ascii_strcasecmp (dn_new, 
dn_cur)) {
-                                                                               found = TRUE;
                                                                                members_cur = g_list_remove 
(members_cur, attr_cur);
                                                                                e_vcard_attribute_free 
(attr_cur);
                                                                                goto next_member;
@@ -2792,11 +2790,9 @@ member_compare (EBookBackendLDAP *self,
                                                        }
                                                }
                                        }
-                                       if (!found) {
-                                               g_list_free_full (members_new, (GDestroyNotify) 
e_vcard_attribute_free);
-                                               g_list_free_full (members_cur, (GDestroyNotify) 
e_vcard_attribute_free);
-                                               return FALSE;
-                                       }
+                                       g_list_free_full (members_new, (GDestroyNotify) 
e_vcard_attribute_free);
+                                       g_list_free_full (members_cur, (GDestroyNotify) 
e_vcard_attribute_free);
+                                       return FALSE;
                                }
                        }
                }
diff --git a/src/camel/camel-mime-utils.c b/src/camel/camel-mime-utils.c
index 4dfcc3780..1aba520f1 100644
--- a/src/camel/camel-mime-utils.c
+++ b/src/camel/camel-mime-utils.c
@@ -1090,7 +1090,7 @@ decode_8bit (const gchar *text,
                }
        } while (inleft > 0);
 
-       while ((rc = g_iconv (cd, NULL, NULL, &outbuf, &outleft)) == (gsize) -1) {
+       while (g_iconv (cd, NULL, NULL, &outbuf, &outleft) == (gsize) -1) {
                if (errno != E2BIG)
                        break;
 
diff --git a/src/camel/camel-text-index.c b/src/camel/camel-text-index.c
index 44909f04d..7271fc3be 100644
--- a/src/camel/camel-text-index.c
+++ b/src/camel/camel-text-index.c
@@ -399,7 +399,6 @@ text_index_compress_nosync (CamelIndex *idx)
        CamelTextIndexPrivate *newp, *oldp;
        camel_key_t oldkeyid, newkeyid;
        GHashTable *remap;
-       guint deleted;
        camel_block_t data, newdata;
        gint i, ret = -1;
        gchar *name = NULL;
@@ -453,7 +452,6 @@ text_index_compress_nosync (CamelIndex *idx)
        io (printf ("Copying undeleted names to new file\n"));
        remap = g_hash_table_new (NULL, NULL);
        oldkeyid = 0;
-       deleted = 0;
        while ((oldkeyid = camel_key_table_next (oldp->name_index, oldkeyid, &name, &flags, &data))) {
                if ((flags&1) == 0) {
                        io (printf ("copying name '%s'\n", name));
@@ -470,7 +468,6 @@ text_index_compress_nosync (CamelIndex *idx)
                }
                g_free (name);
                name = NULL;
-               deleted |= flags;
        }
 
        /* Copy word data across, remapping/deleting and create new index for it */
diff --git a/src/camel/providers/imapx/camel-imapx-server.c b/src/camel/providers/imapx/camel-imapx-server.c
index e5645e251..19720adb9 100644
--- a/src/camel/providers/imapx/camel-imapx-server.c
+++ b/src/camel/providers/imapx/camel-imapx-server.c
@@ -3296,8 +3296,6 @@ camel_imapx_server_authenticate_sync (CamelIMAPXServer *is,
                const gchar *password;
                gchar *password_latin1;
 
-               can_retry_login = -1;
-
                password = camel_service_get_password (service);
                password_latin1 = g_convert_with_fallback (password, -1, "ISO-8859-1", "UTF-8", "", NULL, 
NULL, NULL);
 
diff --git a/src/camel/providers/nntp/camel-nntp-stream.c b/src/camel/providers/nntp/camel-nntp-stream.c
index 0e7e77372..312d68577 100644
--- a/src/camel/providers/nntp/camel-nntp-stream.c
+++ b/src/camel/providers/nntp/camel-nntp-stream.c
@@ -162,7 +162,6 @@ nntp_stream_read (CamelStream *stream,
                                        e = is->end;
                                } else {
                                        *o++ = '\n';
-                                       state = 0;
                                        goto state_0;
                                }
                        } else if (c != '\r') {
diff --git a/src/camel/providers/nntp/camel-nntp-summary.c b/src/camel/providers/nntp/camel-nntp-summary.c
index f16f5deae..8d9e95733 100644
--- a/src/camel/providers/nntp/camel-nntp-summary.c
+++ b/src/camel/providers/nntp/camel-nntp-summary.c
@@ -535,7 +535,7 @@ camel_nntp_summary_check (CamelNNTPSummary *cns,
        }
 
        line +=3;
-       n = strtoul (line, &line, 10);
+       (void)strtoul (line, &line, 10);
        f = strtoul (line, &line, 10);
        l = strtoul (line, &line, 10);
        if (line[0] == ' ') {
diff --git a/src/camel/providers/pop3/camel-pop3-folder.c b/src/camel/providers/pop3/camel-pop3-folder.c
index 4a3381d8e..ed508e928 100644
--- a/src/camel/providers/pop3/camel-pop3-folder.c
+++ b/src/camel/providers/pop3/camel-pop3-folder.c
@@ -191,7 +191,7 @@ cmd_tocache (CamelPOP3Engine *pe,
 
        /* We write an '*' to the start of the stream to say its not complete yet */
        /* This should probably be part of the cache code */
-       if ((n = camel_stream_write (fi->stream, "*", 1, cancellable, &local_error)) == -1)
+       if (camel_stream_write (fi->stream, "*", 1, cancellable, &local_error) == -1)
                goto done;
 
        while ((n = camel_stream_read ((CamelStream *) stream, buffer, sizeof (buffer), cancellable, 
&local_error)) > 0) {
diff --git a/src/camel/providers/pop3/camel-pop3-stream.c b/src/camel/providers/pop3/camel-pop3-stream.c
index 365440cd7..ebee91cf3 100644
--- a/src/camel/providers/pop3/camel-pop3-stream.c
+++ b/src/camel/providers/pop3/camel-pop3-stream.c
@@ -158,7 +158,6 @@ stream_read (CamelStream *stream,
                                        e = is->end;
                                } else {
                                        *o++ = '\n';
-                                       state = 0;
                                        goto state_0;
                                }
                        } else if (c != '\r') {
diff --git a/src/libedataserver/e-collator.c b/src/libedataserver/e-collator.c
index 180f7840e..af9909141 100644
--- a/src/libedataserver/e-collator.c
+++ b/src/libedataserver/e-collator.c
@@ -158,7 +158,7 @@ canonicalize_locale (const gchar *posix_locale,
        }
 
        status = U_ZERO_ERROR;
-       len = uloc_getLanguage (icu_locale, language_buffer, 8, &status);
+       uloc_getLanguage (icu_locale, language_buffer, 8, &status);
        if (U_FAILURE (status)) {
                g_set_error (
                        error, E_COLLATOR_ERROR,
diff --git a/src/libedataserver/e-data-server-util.c b/src/libedataserver/e-data-server-util.c
index d2261d1d2..0380642e8 100644
--- a/src/libedataserver/e-data-server-util.c
+++ b/src/libedataserver/e-data-server-util.c
@@ -363,7 +363,6 @@ stripped_char (gunichar ch)
        gunichar decomp[4];
        gunichar retval;
        GUnicodeType utype;
-       gsize dlen;
 
        utype = g_unichar_type (ch);
 
@@ -379,7 +378,7 @@ stripped_char (gunichar ch)
                ch = g_unichar_tolower (ch);
                /* falls through */
        case G_UNICODE_LOWERCASE_LETTER:
-               if ((dlen = g_unichar_fully_decompose (ch, FALSE, decomp, 4))) {
+               if (g_unichar_fully_decompose (ch, FALSE, decomp, 4)) {
                        retval = decomp[0];
                        return retval;
                }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]