[gnome-control-center/carousel-uninitialized-value: 2/2] user-accounts: Prevent usage of uninitialized value
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/carousel-uninitialized-value: 2/2] user-accounts: Prevent usage of uninitialized value
- Date: Mon, 13 Jan 2020 16:20:24 +0000 (UTC)
commit 7611e07e3feaedb418480d12513d25f9ddc864c7
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 0cfa7374b..c1311f7dc 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]