[libadwaita/wip/chergert/fix-maybe-uninitialized] combo-row: fix -Wmaybe-uninitialized warning




commit 5c7e4e746fe74780d164f9fea58c39855c88038c
Author: Christian Hergert <chergert redhat com>
Date:   Wed Oct 6 17:17:18 2021 -0700

    combo-row: fix -Wmaybe-uninitialized warning
    
    Obviously not actually a bug, but GCC ain't so smart when it comes to
    autocleanup.

 src/adw-combo-row.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/src/adw-combo-row.c b/src/adw-combo-row.c
index f74168ad..4bd31bb6 100644
--- a/src/adw-combo-row.c
+++ b/src/adw-combo-row.c
@@ -248,9 +248,7 @@ unbind_item (GtkSignalListItemFactory *factory,
 static void
 set_default_factory (AdwComboRow *self)
 {
-  g_autoptr (GtkListItemFactory) factory;
-
-  factory = gtk_signal_list_item_factory_new ();
+  g_autoptr (GtkListItemFactory) factory = gtk_signal_list_item_factory_new ();
 
   g_signal_connect (factory, "setup", G_CALLBACK (setup_item), self);
   g_signal_connect (factory, "bind", G_CALLBACK (bind_item), self);


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