[gnome-control-center/carousel-uninitialized-value] user-accounts: Prevent usage of uninitialized value



commit 3a573dc616663648f6b1c4a9efed43dd473c2ef1
Author: Ondrej Holy <oholy redhat com>
Date:   Mon Jan 13 14:22:31 2020 +0100

    user-accounts: Prevent usage of uninitialized value
    
    gtk_widget_translate_coordinates() doesn't have to always set the
    dest_x argument. Let's initialize the argument before use to prevent
    usage of uninitialized value, which also prevents "Conditional jump
    or move depends on uninitialised value(s)" messages from valgrind.

 panels/user-accounts/cc-carousel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/panels/user-accounts/cc-carousel.c b/panels/user-accounts/cc-carousel.c
index e1878bb70..238c2bcd7 100644
--- a/panels/user-accounts/cc-carousel.c
+++ b/panels/user-accounts/cc-carousel.c
@@ -87,7 +87,7 @@ cc_carousel_item_get_x (CcCarouselItem *item,
 {
         GtkWidget *widget, *parent;
         gint width;
-        gint dest_x;
+        gint dest_x = 0;
 
         parent = GTK_WIDGET (carousel->stack);
         widget = GTK_WIDGET (item);


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