[evolution-data-server] e-data-book-cursor.c: Mute a compiler warning



commit cc512fadd1466622e7ecbba0039a2aa16bba8acc
Author: Milan Crha <mcrha redhat com>
Date:   Fri May 29 13:37:47 2020 +0200

    e-data-book-cursor.c: Mute a compiler warning
    
    gcc claimed the variable can be used uninitialized, but it's a false
    positive, because it's checked at the top that the passed-in 'origin'
    is of the expected value. It's easy to mute the warning, thus do that.

 src/addressbook/libedata-book/e-data-book-cursor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/addressbook/libedata-book/e-data-book-cursor.c 
b/src/addressbook/libedata-book/e-data-book-cursor.c
index ee22b9ae3..18f4c71e8 100644
--- a/src/addressbook/libedata-book/e-data-book-cursor.c
+++ b/src/addressbook/libedata-book/e-data-book-cursor.c
@@ -493,7 +493,7 @@ calculate_step_position (EDataBookCursor *cursor,
                          gint results)
 {
        EDataBookCursorPrivate *priv = cursor->priv;
-       gint new_position;
+       gint new_position = 0;
        gint offset = results;
 
        g_return_if_fail (origin == E_BOOK_CURSOR_ORIGIN_CURRENT ||


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