[gnome-builder] color-picker: initialize autofree to NULL



commit 7ebe250dd9af2855569fab4d5d0c5547d94e98b5
Author: Christian Hergert <chergert redhat com>
Date:   Tue Jan 2 23:46:29 2018 -0800

    color-picker: initialize autofree to NULL

 src/gstyle/tests/test-gstyle-filter.c            |    2 +-
 src/gstyle/tests/test-gstyle-palette.c           |    2 +-
 src/plugins/color-picker/gb-color-picker-prefs.c |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/gstyle/tests/test-gstyle-filter.c b/src/gstyle/tests/test-gstyle-filter.c
index 57e5489..2a2499c 100644
--- a/src/gstyle/tests/test-gstyle-filter.c
+++ b/src/gstyle/tests/test-gstyle-filter.c
@@ -96,7 +96,7 @@ static void
 setup_sample (FilterData *filter_data,
               gint        sample_num)
 {
-  g_autofree gchar *name;
+  g_autofree gchar *name = NULL;
   gint width;
   gint height;
   GError *error = NULL;
diff --git a/src/gstyle/tests/test-gstyle-palette.c b/src/gstyle/tests/test-gstyle-palette.c
index 3adafa1..ff1bf93 100644
--- a/src/gstyle/tests/test-gstyle-palette.c
+++ b/src/gstyle/tests/test-gstyle-palette.c
@@ -28,7 +28,7 @@ load_palette (gchar *name)
   GstylePalette *palette;
   g_autoptr (GFile) file = NULL;
   g_autofree gchar *uri = NULL;
-  g_autofree gchar *path;
+  g_autofree gchar *path = NULL;
   GError *error = NULL;
   GCancellable *cancellable = NULL;
 
diff --git a/src/plugins/color-picker/gb-color-picker-prefs.c 
b/src/plugins/color-picker/gb-color-picker-prefs.c
index 6dfc5a3..eaab2ab 100644
--- a/src/plugins/color-picker/gb-color-picker-prefs.c
+++ b/src/plugins/color-picker/gb-color-picker-prefs.c
@@ -74,7 +74,7 @@ create_palette_close_dialog (GbColorPickerPrefs *self,
 {
   GtkWindow *toplevel;
   GtkDialog *dialog;
-  g_autofree gchar *text;
+  g_autofree gchar *text = NULL;
   const gchar *palette_name;
 
   g_assert (GB_IS_COLOR_PICKER_PREFS (self));
@@ -451,7 +451,7 @@ create_palette_list_item (gpointer item,
   GstylePalette *palette = (GstylePalette *)item;
   GtkWidget *row;
   const gchar *name;
-  g_autofree gchar *target;
+  g_autofree gchar *target = NULL;
 
   g_assert (GB_IS_COLOR_PICKER_PREFS (self));
   g_assert (GSTYLE_IS_PALETTE (palette));


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