[evolution-data-server] M!54 - Remove unneeded assignments in nntp_get_existing_article_numbers()



commit 3e6612feb0b6d958adb31a8e14d1d3b8c6cf65c2
Author: Markus Elfring <elfring users sourceforge net>
Date:   Wed Nov 25 11:58:08 2020 +0100

    M!54 - Remove unneeded assignments in nntp_get_existing_article_numbers()
    
    The tool “clang-tidy 11” informed about the following implementation details
    according to the source code check “clang-analyzer-deadcode.DeadStores”.
    
    * 462:10:
      Although the value stored to 'ret' is used in the enclosing expression,
      the value is never actually read from 'ret'.
    
    * 481:2:
      Value stored to 'ret' is never read.
    
    Thus remove these variable assignments from this function.
    
    Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/merge_requests/54

 src/camel/providers/nntp/camel-nntp-summary.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/src/camel/providers/nntp/camel-nntp-summary.c b/src/camel/providers/nntp/camel-nntp-summary.c
index fabee3d4f..f16f5deae 100644
--- a/src/camel/providers/nntp/camel-nntp-summary.c
+++ b/src/camel/providers/nntp/camel-nntp-summary.c
@@ -459,7 +459,7 @@ nntp_get_existing_article_numbers (CamelNNTPSummary *cns,
 
        count = 0;
 
-       while ((ret = camel_nntp_stream_line (nntp_stream, (guchar **) &line, &len, cancellable, error)) > 0) 
{
+       while (camel_nntp_stream_line (nntp_stream, (guchar **) &line, &len, cancellable, error) > 0) {
                guint nn;
 
                if (len == 1 && g_ascii_strncasecmp (line, ".", len) == 0)
@@ -478,8 +478,6 @@ nntp_get_existing_article_numbers (CamelNNTPSummary *cns,
                }
        }
 
-       ret = 0;
-
  ioerror:
 
        g_clear_object (&nntp_stream);


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