[gimp] Initialize GValues with G_VALUE_INIT instead of { 0, }



commit 47ef3be1457bc573b862fbb2699ecbb2f8237429
Author: Michael Natterer <mitch gimp org>
Date:   Sat Mar 26 15:59:26 2016 +0100

    Initialize GValues with G_VALUE_INIT instead of { 0, }

 app/config/gimpconfig-utils.c              |    4 ++--
 app/config/gimprc.c                        |    4 ++--
 app/config/test-config.c                   |    2 +-
 app/core/gimp.c                            |    8 ++++----
 app/core/gimpcurve.c                       |    4 ++--
 app/core/gimpdashpattern.c                 |    2 +-
 app/core/gimpparamspecs-duplicate.c        |    2 +-
 app/core/gimpsymmetry-tiling.c             |    4 ++--
 app/dialogs/preferences-dialog.c           |   18 +++++++++---------
 app/gegl/gimp-gegl-config.c                |    2 +-
 app/pdb/gimpprocedure.c                    |    6 +++---
 app/plug-in/plug-in-params.c               |    2 +-
 app/tools/gimprectangleoptions.c           |   12 ++++++------
 app/tools/gimptexttool.c                   |    4 ++--
 app/widgets/gimpcolordisplayeditor.c       |    4 ++--
 app/widgets/gimpdeviceinfo.c               |    4 ++--
 app/widgets/gimplanguagestore.c            |    4 ++--
 app/widgets/gimpsessioninfo-aux.c          |    6 +++---
 app/xcf/xcf-load.c                         |    2 +-
 libgimpconfig/gimpconfig-deserialize.c     |    6 +++---
 libgimpconfig/gimpconfig-iface.c           |    4 ++--
 libgimpconfig/gimpconfig-serialize.c       |    8 ++++----
 libgimpconfig/gimpconfig-utils.c           |   10 +++++-----
 libgimpthumb/gimpthumbnail.c               |    4 ++--
 libgimpwidgets/gimppropwidgets.c           |   10 +++++-----
 libgimpwidgets/gimpstringcombobox.c        |    2 +-
 libgimpwidgets/gimpunitmenu.c              |    2 +-
 libgimpwidgets/gimpunitstore.c             |    2 +-
 modules/gimpinputdevicestore-dx.c          |    6 +++---
 modules/gimpinputdevicestore-gudev.c       |    4 ++--
 plug-ins/common/file-xmc.c                 |    2 +-
 plug-ins/help-browser/gimpthrobberaction.c |    2 +-
 32 files changed, 78 insertions(+), 78 deletions(-)
---
diff --git a/app/config/gimpconfig-utils.c b/app/config/gimpconfig-utils.c
index 5d69641..ec80908 100644
--- a/app/config/gimpconfig-utils.c
+++ b/app/config/gimpconfig-utils.c
@@ -47,7 +47,7 @@ gimp_config_connect_notify (GObject    *src,
           (dest_spec->flags & G_PARAM_WRITABLE)             &&
           (dest_spec->flags & G_PARAM_CONSTRUCT_ONLY) == 0)
         {
-          GValue value = { 0, };
+          GValue value = G_VALUE_INIT;
 
           g_value_init (&value, param_spec->value_type);
 
@@ -128,7 +128,7 @@ gimp_config_connect_full_notify (GObject    *src,
           (dest_spec->flags & G_PARAM_WRITABLE)             &&
           (dest_spec->flags & G_PARAM_CONSTRUCT_ONLY) == 0)
         {
-          GValue value = { 0, };
+          GValue value = G_VALUE_INIT;
 
           g_value_init (&value, param_spec->value_type);
 
diff --git a/app/config/gimprc.c b/app/config/gimprc.c
index 14981ce..0e23714 100644
--- a/app/config/gimprc.c
+++ b/app/config/gimprc.c
@@ -407,7 +407,7 @@ gimp_rc_query (GimpRc      *rc,
   if (prop_spec)
     {
       GString *str   = g_string_new (NULL);
-      GValue   value = { 0, };
+      GValue   value = G_VALUE_INIT;
 
       g_value_init (&value, prop_spec->value_type);
       g_object_get_property (rc_object, prop_spec->name, &value);
@@ -556,7 +556,7 @@ gimp_rc_migrate (GimpRc *rc)
 
       if (GIMP_IS_PARAM_SPEC_CONFIG_PATH (pspec))
         {
-          GValue value = { 0, };
+          GValue value = G_VALUE_INIT;
 
           g_value_init (&value, pspec->value_type);
 
diff --git a/app/config/test-config.c b/app/config/test-config.c
index da0aa9b..f7104f3 100644
--- a/app/config/test-config.c
+++ b/app/config/test-config.c
@@ -194,7 +194,7 @@ notify_callback (GObject    *object,
                  GParamSpec *pspec)
 {
   GString *str;
-  GValue   value = { 0, };
+  GValue   value = G_VALUE_INIT;
 
   g_return_if_fail (G_IS_OBJECT (object));
   g_return_if_fail (G_IS_PARAM_SPEC (pspec));
diff --git a/app/core/gimp.c b/app/core/gimp.c
index 3f61060..93ecbf1 100644
--- a/app/core/gimp.c
+++ b/app/core/gimp.c
@@ -957,8 +957,8 @@ gimp_global_config_notify (GObject    *global_config,
                            GParamSpec *param_spec,
                            GObject    *edit_config)
 {
-  GValue global_value = { 0, };
-  GValue edit_value   = { 0, };
+  GValue global_value = G_VALUE_INIT;
+  GValue edit_value   = G_VALUE_INIT;
 
   g_value_init (&global_value, param_spec->value_type);
   g_value_init (&edit_value,   param_spec->value_type);
@@ -988,8 +988,8 @@ gimp_edit_config_notify (GObject    *edit_config,
                          GParamSpec *param_spec,
                          GObject    *global_config)
 {
-  GValue edit_value   = { 0, };
-  GValue global_value = { 0, };
+  GValue edit_value   = G_VALUE_INIT;
+  GValue global_value = G_VALUE_INIT;
 
   g_value_init (&edit_value,   param_spec->value_type);
   g_value_init (&global_value, param_spec->value_type);
diff --git a/app/core/gimpcurve.c b/app/core/gimpcurve.c
index 5dbae17..cd02a74 100644
--- a/app/core/gimpcurve.c
+++ b/app/core/gimpcurve.c
@@ -312,7 +312,7 @@ gimp_curve_get_property (GObject    *object,
     case PROP_POINTS:
       {
         GimpValueArray *array = gimp_value_array_new (curve->n_points * 2);
-        GValue          v     = { 0, };
+        GValue          v     = G_VALUE_INIT;
         gint            i;
 
         g_value_init (&v, G_TYPE_DOUBLE);
@@ -339,7 +339,7 @@ gimp_curve_get_property (GObject    *object,
     case PROP_SAMPLES:
       {
         GimpValueArray *array = gimp_value_array_new (curve->n_samples);
-        GValue          v     = { 0, };
+        GValue          v     = G_VALUE_INIT;
         gint            i;
 
         g_value_init (&v, G_TYPE_DOUBLE);
diff --git a/app/core/gimpdashpattern.c b/app/core/gimpdashpattern.c
index 60ffcf7..9c1571e 100644
--- a/app/core/gimpdashpattern.c
+++ b/app/core/gimpdashpattern.c
@@ -254,7 +254,7 @@ gimp_dash_pattern_to_value_array (GArray *pattern)
   if (pattern != NULL && pattern->len > 0)
     {
       GimpValueArray *value_array = gimp_value_array_new (pattern->len);
-      GValue          item        = { 0, };
+      GValue          item        = G_VALUE_INIT;
       gint            i;
 
       g_value_init (&item, G_TYPE_DOUBLE);
diff --git a/app/core/gimpparamspecs-duplicate.c b/app/core/gimpparamspecs-duplicate.c
index 005d453..595c9f8 100644
--- a/app/core/gimpparamspecs-duplicate.c
+++ b/app/core/gimpparamspecs-duplicate.c
@@ -215,7 +215,7 @@ gimp_param_spec_duplicate (GParamSpec *pspec)
       gdouble    g = 0.0;
       gdouble    b = 0.0;
       gdouble    a = 1.0;
-      GValue     value = { 0, };
+      GValue     value = G_VALUE_INIT;
 
       g_value_init (&value, GEGL_TYPE_COLOR);
       g_param_value_set_default (pspec, &value);
diff --git a/app/core/gimpsymmetry-tiling.c b/app/core/gimpsymmetry-tiling.c
index e7d9762..3c6a4d6 100644
--- a/app/core/gimpsymmetry-tiling.c
+++ b/app/core/gimpsymmetry-tiling.c
@@ -204,7 +204,7 @@ gimp_tiling_set_property (GObject      *object,
 
               if (tiling->interval_x <= tiling->shift + G_DOUBLE_EPSILON)
                 {
-                  GValue val = {0,};
+                  GValue val = G_VALUE_INIT;
 
                   g_value_init (&val, G_TYPE_DOUBLE);
                   g_value_set_double (&val, 0.0);
@@ -225,7 +225,7 @@ gimp_tiling_set_property (GObject      *object,
 
               if (tiling->interval_y <= G_DOUBLE_EPSILON)
                 {
-                  GValue val = {0,};
+                  GValue val = G_VALUE_INIT;
 
                   g_value_init (&val, G_TYPE_DOUBLE);
                   g_value_set_double (&val, 0.0);
diff --git a/app/dialogs/preferences-dialog.c b/app/dialogs/preferences-dialog.c
index c839c83..baacd03 100644
--- a/app/dialogs/preferences-dialog.c
+++ b/app/dialogs/preferences-dialog.c
@@ -180,8 +180,8 @@ prefs_config_notify (GObject    *config,
                      GParamSpec *param_spec,
                      GObject    *config_copy)
 {
-  GValue global_value = { 0, };
-  GValue copy_value   = { 0, };
+  GValue global_value = G_VALUE_INIT;
+  GValue copy_value   = G_VALUE_INIT;
 
   g_value_init (&global_value, param_spec->value_type);
   g_value_init (&copy_value,   param_spec->value_type);
@@ -211,8 +211,8 @@ prefs_config_copy_notify (GObject    *config_copy,
                           GParamSpec *param_spec,
                           GObject    *config)
 {
-  GValue copy_value   = { 0, };
-  GValue global_value = { 0, };
+  GValue copy_value   = G_VALUE_INIT;
+  GValue global_value = G_VALUE_INIT;
 
   g_value_init (&copy_value,   param_spec->value_type);
   g_value_init (&global_value, param_spec->value_type);
@@ -324,7 +324,7 @@ prefs_response (GtkWidget *widget,
         for (list = confirm_diff; list; list = g_list_next (list))
           {
             GParamSpec *param_spec = list->data;
-            GValue      value      = { 0, };
+            GValue      value      = G_VALUE_INIT;
 
             g_value_init (&value, param_spec->value_type);
 
@@ -395,7 +395,7 @@ prefs_response (GtkWidget *widget,
         for (list = diff; list; list = g_list_next (list))
           {
             GParamSpec *param_spec = list->data;
-            GValue      value      = { 0, };
+            GValue      value      = G_VALUE_INIT;
 
             g_value_init (&value, param_spec->value_type);
 
@@ -704,7 +704,7 @@ prefs_format_string_select_callback (GtkTreeSelection *sel,
 
   if (gtk_tree_selection_get_selected (sel, &model, &iter))
     {
-      GValue val = { 0, };
+      GValue val = G_VALUE_INIT;
 
       gtk_tree_model_get_value (model, &iter, 1, &val);
       gtk_entry_set_text (entry, g_value_get_string (&val));
@@ -721,7 +721,7 @@ prefs_theme_select_callback (GtkTreeSelection *sel,
 
   if (gtk_tree_selection_get_selected (sel, &model, &iter))
     {
-      GValue val = { 0, };
+      GValue val = G_VALUE_INIT;
 
       gtk_tree_model_get_value (model, &iter, 0, &val);
       g_object_set_property (G_OBJECT (gimp->config), "theme", &val);
@@ -745,7 +745,7 @@ prefs_icon_theme_select_callback (GtkTreeSelection *sel,
 
   if (gtk_tree_selection_get_selected (sel, &model, &iter))
     {
-      GValue val = { 0, };
+      GValue val = G_VALUE_INIT;
 
       gtk_tree_model_get_value (model, &iter, 1, &val);
       g_object_set_property (G_OBJECT (gimp->config), "icon-theme", &val);
diff --git a/app/gegl/gimp-gegl-config.c b/app/gegl/gimp-gegl-config.c
index 19076c3..b4c815d 100644
--- a/app/gegl/gimp-gegl-config.c
+++ b/app/gegl/gimp-gegl-config.c
@@ -376,7 +376,7 @@ gimp_gegl_config_sync_node (GimpObject *config,
 
       if (gimp_pspec)
         {
-          GValue value = { 0, };
+          GValue value = G_VALUE_INIT;
 
           g_value_init (&value, gimp_pspec->value_type);
 
diff --git a/app/pdb/gimpprocedure.c b/app/pdb/gimpprocedure.c
index a4e0a36..a30d430 100644
--- a/app/pdb/gimpprocedure.c
+++ b/app/pdb/gimpprocedure.c
@@ -511,7 +511,7 @@ GimpValueArray *
 gimp_procedure_get_arguments (GimpProcedure *procedure)
 {
   GimpValueArray *args;
-  GValue          value = { 0, };
+  GValue          value = G_VALUE_INIT;
   gint            i;
 
   g_return_val_if_fail (GIMP_IS_PROCEDURE (procedure), NULL);
@@ -534,7 +534,7 @@ gimp_procedure_get_return_values (GimpProcedure *procedure,
                                   const GError  *error)
 {
   GimpValueArray *args;
-  GValue          value = { 0, };
+  GValue          value = G_VALUE_INIT;
   gint            i;
 
   g_return_val_if_fail (success == FALSE || GIMP_IS_PROCEDURE (procedure),
@@ -753,7 +753,7 @@ gimp_procedure_validate_args (GimpProcedure  *procedure,
         }
       else if (! (pspec->flags & GIMP_PARAM_NO_VALIDATE))
         {
-          GValue string_value = { 0, };
+          GValue string_value = G_VALUE_INIT;
 
           g_value_init (&string_value, G_TYPE_STRING);
 
diff --git a/app/plug-in/plug-in-params.c b/app/plug-in/plug-in-params.c
index d9932c9..73165c5 100644
--- a/app/plug-in/plug-in-params.c
+++ b/app/plug-in/plug-in-params.c
@@ -54,7 +54,7 @@ plug_in_params_to_args (GParamSpec **pspecs,
 
   for (i = 0; i < n_params; i++)
     {
-      GValue value = { 0, };
+      GValue value = G_VALUE_INIT;
       GType  type;
       gint   count;
 
diff --git a/app/tools/gimprectangleoptions.c b/app/tools/gimprectangleoptions.c
index d2a7bbf..5e13270 100644
--- a/app/tools/gimprectangleoptions.c
+++ b/app/tools/gimprectangleoptions.c
@@ -1126,12 +1126,12 @@ static void
 gimp_number_pair_entry_history_add (GtkWidget    *entry,
                                     GtkTreeModel *model)
 {
-  GValue               value = { 0, };
-  GtkTreeIter          iter;
-  gboolean             iter_valid;
-  gdouble              left_number;
-  gdouble              right_number;
-  const gchar         *text;
+  GValue       value = G_VALUE_INIT;
+  GtkTreeIter  iter;
+  gboolean     iter_valid;
+  gdouble      left_number;
+  gdouble      right_number;
+  const gchar *text;
 
   text = gtk_entry_get_text (GTK_ENTRY (entry));
   gimp_number_pair_entry_get_values (GIMP_NUMBER_PAIR_ENTRY (entry),
diff --git a/app/tools/gimptexttool.c b/app/tools/gimptexttool.c
index 863e5d9..12825f9 100644
--- a/app/tools/gimptexttool.c
+++ b/app/tools/gimptexttool.c
@@ -1155,7 +1155,7 @@ gimp_text_tool_text_notify (GimpText         *text,
 
   if ((pspec->flags & G_PARAM_READWRITE) == G_PARAM_READWRITE)
     {
-      GValue value = { 0, };
+      GValue value = G_VALUE_INIT;
 
       g_value_init (&value, pspec->value_type);
 
@@ -1313,7 +1313,7 @@ gimp_text_tool_apply (GimpTextTool *text_tool,
 
   for (; list; list = g_list_next (list))
     {
-      GValue value = { 0, };
+      GValue value = G_VALUE_INIT;
 
       /*  look ahead and compress changes  */
       if (list->next && list->next->data == list->data)
diff --git a/app/widgets/gimpcolordisplayeditor.c b/app/widgets/gimpcolordisplayeditor.c
index 9d83bac..f52fbb0 100644
--- a/app/widgets/gimpcolordisplayeditor.c
+++ b/app/widgets/gimpcolordisplayeditor.c
@@ -521,7 +521,7 @@ gimp_color_display_editor_src_changed (GtkTreeSelection       *sel,
 
   if (gtk_tree_selection_get_selected (sel, &model, &iter))
     {
-      GValue val = { 0, };
+      GValue val = G_VALUE_INIT;
 
       gtk_tree_model_get_value (model, &iter, SRC_COLUMN_NAME, &val);
 
@@ -556,7 +556,7 @@ gimp_color_display_editor_dest_changed (GtkTreeSelection       *sel,
 
   if (gtk_tree_selection_get_selected (sel, &model, &iter))
     {
-      GValue val = { 0, };
+      GValue val = G_VALUE_INIT;
 
       gtk_tree_model_get_value (model, &iter, DEST_COLUMN_FILTER, &val);
 
diff --git a/app/widgets/gimpdeviceinfo.c b/app/widgets/gimpdeviceinfo.c
index 1f91cdf..f8a1817 100644
--- a/app/widgets/gimpdeviceinfo.c
+++ b/app/widgets/gimpdeviceinfo.c
@@ -410,7 +410,7 @@ gimp_device_info_get_property (GObject    *object,
     case PROP_AXES:
       {
         GimpValueArray *array;
-        GValue          enum_value = { 0, };
+        GValue          enum_value = G_VALUE_INIT;
         gint            n_axes;
         gint            i;
 
@@ -436,7 +436,7 @@ gimp_device_info_get_property (GObject    *object,
     case PROP_KEYS:
       {
         GimpValueArray *array;
-        GValue          string_value = { 0, };
+        GValue          string_value = G_VALUE_INIT;
         gint            n_keys;
         gint            i;
 
diff --git a/app/widgets/gimplanguagestore.c b/app/widgets/gimplanguagestore.c
index 19fd9de..514b3b4 100644
--- a/app/widgets/gimplanguagestore.c
+++ b/app/widgets/gimplanguagestore.c
@@ -113,8 +113,8 @@ gimp_language_store_sort (GtkTreeModel *model,
                           GtkTreeIter  *b,
                           gpointer      userdata)
 {
-  GValue avalue = { 0, };
-  GValue bvalue = { 0, };
+  GValue avalue = G_VALUE_INIT;
+  GValue bvalue = G_VALUE_INIT;
   gint   cmp    = 0;
 
   /*  keep system language at the top of the list  */
diff --git a/app/widgets/gimpsessioninfo-aux.c b/app/widgets/gimpsessioninfo-aux.c
index d77b28a..38707fa 100644
--- a/app/widgets/gimpsessioninfo-aux.c
+++ b/app/widgets/gimpsessioninfo-aux.c
@@ -87,7 +87,7 @@ gimp_session_info_aux_new_from_props (GObject *object,
       if (pspec)
         {
           GString *str   = g_string_new (NULL);
-          GValue   value = { 0, };
+          GValue   value = G_VALUE_INIT;
 
           g_value_init (&value, pspec->value_type);
           g_object_get_property (object, pspec->name, &value);
@@ -146,7 +146,7 @@ gimp_session_info_aux_set_props (GObject *object,
 
               if (pspec)
                 {
-                  GValue  value = { 0, };
+                  GValue  value = G_VALUE_INIT;
 
                   g_value_init (&value, pspec->value_type);
 
@@ -173,7 +173,7 @@ gimp_session_info_aux_set_props (GObject *object,
                     }
                   else
                     {
-                      GValue  str_value = { 0, };
+                      GValue  str_value = G_VALUE_INIT;
 
                       g_value_init (&str_value, G_TYPE_STRING);
                       g_value_set_static_string (&str_value, aux->value);
diff --git a/app/xcf/xcf-load.c b/app/xcf/xcf-load.c
index 72e45ed..b431262 100644
--- a/app/xcf/xcf-load.c
+++ b/app/xcf/xcf-load.c
@@ -2386,7 +2386,7 @@ xcf_load_vector (XcfInfo   *info,
       gint         j;
 
       GimpValueArray *control_points;
-      GValue          value = { 0, };
+      GValue          value  = G_VALUE_INIT;
       GimpAnchor      anchor = { { 0, } };
       GType           stroke_type;
 
diff --git a/libgimpconfig/gimpconfig-deserialize.c b/libgimpconfig/gimpconfig-deserialize.c
index dbde3f6..7a3114e 100644
--- a/libgimpconfig/gimpconfig-deserialize.c
+++ b/libgimpconfig/gimpconfig-deserialize.c
@@ -238,8 +238,8 @@ gimp_config_deserialize_property (GimpConfig *config,
   GimpConfigInterface *config_iface = NULL;
   GimpConfigInterface *parent_iface = NULL;
   GParamSpec          *prop_spec;
-  GTokenType           token = G_TOKEN_RIGHT_PAREN;
-  GValue               value = { 0, };
+  GTokenType           token        = G_TOKEN_RIGHT_PAREN;
+  GValue               value        = G_VALUE_INIT;
   guint                old_scope_id;
 
   old_scope_id = g_scanner_set_scope (scanner, 0);
@@ -714,7 +714,7 @@ gimp_config_deserialize_value_array (GValue     *value,
 {
   GimpParamSpecValueArray *array_spec;
   GimpValueArray          *array;
-  GValue                   array_value = { 0, };
+  GValue                   array_value = G_VALUE_INIT;
   gint                     n_values;
   GTokenType               token;
   gint                     i;
diff --git a/libgimpconfig/gimpconfig-iface.c b/libgimpconfig/gimpconfig-iface.c
index b757b36..67eb3f9 100644
--- a/libgimpconfig/gimpconfig-iface.c
+++ b/libgimpconfig/gimpconfig-iface.c
@@ -201,8 +201,8 @@ gimp_config_iface_equal (GimpConfig *a,
   for (i = 0; equal && i < n_property_specs; i++)
     {
       GParamSpec  *prop_spec;
-      GValue       a_value = { 0, };
-      GValue       b_value = { 0, };
+      GValue       a_value = G_VALUE_INIT;
+      GValue       b_value = G_VALUE_INIT;
 
       prop_spec = property_specs[i];
 
diff --git a/libgimpconfig/gimpconfig-serialize.c b/libgimpconfig/gimpconfig-serialize.c
index 95498dd..55e5eb5 100644
--- a/libgimpconfig/gimpconfig-serialize.c
+++ b/libgimpconfig/gimpconfig-serialize.c
@@ -117,7 +117,7 @@ gimp_config_serialize_changed_properties (GimpConfig       *config,
   GParamSpec   **property_specs;
   guint          n_property_specs;
   guint          i;
-  GValue         value = { 0, };
+  GValue         value = G_VALUE_INIT;
 
   g_return_val_if_fail (G_IS_OBJECT (config), FALSE);
 
@@ -171,8 +171,8 @@ gimp_config_serialize_property (GimpConfig       *config,
 {
   GimpConfigInterface *config_iface = NULL;
   GimpConfigInterface *parent_iface = NULL;
-  GValue               value   = { 0, };
-  gboolean             success = FALSE;
+  GValue               value        = G_VALUE_INIT;
+  gboolean             success      = FALSE;
 
   if (! (param_spec->flags & GIMP_CONFIG_PARAM_SERIALIZE))
     return FALSE;
@@ -486,7 +486,7 @@ gimp_config_serialize_value (const GValue *value,
 
   if (g_value_type_transformable (G_VALUE_TYPE (value), G_TYPE_STRING))
     {
-      GValue  tmp_value = { 0, };
+      GValue  tmp_value = G_VALUE_INIT;
 
       g_value_init (&tmp_value, G_TYPE_STRING);
       g_value_transform (value, &tmp_value);
diff --git a/libgimpconfig/gimpconfig-utils.c b/libgimpconfig/gimpconfig-utils.c
index f1c3c6f..fc27964 100644
--- a/libgimpconfig/gimpconfig-utils.c
+++ b/libgimpconfig/gimpconfig-utils.c
@@ -47,8 +47,8 @@ gimp_config_diff_property (GObject    *a,
                            GObject    *b,
                            GParamSpec *prop_spec)
 {
-  GValue    a_value = { 0, };
-  GValue    b_value = { 0, };
+  GValue    a_value = G_VALUE_INIT;
+  GValue    b_value = G_VALUE_INIT;
   gboolean  retval  = FALSE;
 
   g_value_init (&a_value, prop_spec->value_type);
@@ -231,7 +231,7 @@ gimp_config_sync (GObject     *src,
 
       if (! (prop_spec->flags & G_PARAM_CONSTRUCT_ONLY))
         {
-          GValue value = { 0, };
+          GValue value = G_VALUE_INIT;
 
           g_value_init (&value, prop_spec->value_type);
 
@@ -266,7 +266,7 @@ gimp_config_reset_properties (GObject *object)
 {
   GObjectClass  *klass;
   GParamSpec   **property_specs;
-  GValue         value = { 0, };
+  GValue         value = G_VALUE_INIT;
   guint          n_property_specs;
   guint          i;
 
@@ -353,7 +353,7 @@ gimp_config_reset_property (GObject     *object,
   if ((prop_spec->flags & G_PARAM_WRITABLE) &&
       ! (prop_spec->flags & G_PARAM_CONSTRUCT_ONLY))
     {
-      GValue  value = { 0, };
+      GValue  value = G_VALUE_INIT;
 
       if (G_IS_PARAM_SPEC_OBJECT (prop_spec))
         {
diff --git a/libgimpthumb/gimpthumbnail.c b/libgimpthumb/gimpthumbnail.c
index d74664f..d2792b8 100644
--- a/libgimpthumb/gimpthumbnail.c
+++ b/libgimpthumb/gimpthumbnail.c
@@ -944,7 +944,7 @@ static void
 gimp_thumbnail_debug_notify (GObject    *object,
                              GParamSpec *pspec)
 {
-  GValue       value = { 0, };
+  GValue       value = G_VALUE_INIT;
   gchar       *str   = NULL;
   const gchar *name;
 
@@ -957,7 +957,7 @@ gimp_thumbnail_debug_notify (GObject    *object,
     }
   else if (g_value_type_transformable (pspec->value_type, G_TYPE_STRING))
     {
-      GValue  tmp = { 0, };
+      GValue  tmp = G_VALUE_INIT;
 
       g_value_init (&tmp, G_TYPE_STRING);
       g_value_transform (&value, &tmp);
diff --git a/libgimpwidgets/gimppropwidgets.c b/libgimpwidgets/gimppropwidgets.c
index 8820d23..59def49 100644
--- a/libgimpwidgets/gimppropwidgets.c
+++ b/libgimpwidgets/gimppropwidgets.c
@@ -1862,7 +1862,7 @@ gimp_prop_label_notify (GObject    *config,
                         GParamSpec *param_spec,
                         GtkWidget  *label)
 {
-  GValue  value = { 0, };
+  GValue  value = G_VALUE_INIT;
 
   g_value_init (&value, param_spec->value_type);
 
@@ -1876,7 +1876,7 @@ gimp_prop_label_notify (GObject    *config,
     }
   else
     {
-      GValue       str_value = { 0, };
+      GValue       str_value = G_VALUE_INIT;
       const gchar *str;
 
       g_value_init (&str_value, G_TYPE_STRING);
@@ -2787,7 +2787,7 @@ gimp_prop_size_entry_new (GObject                   *config,
 
   if (unit_property_name)
     {
-      GValue value = { 0 };
+      GValue value = G_VALUE_INIT;
 
       unit_param_spec = check_param_spec_w (config, unit_property_name,
                                             GIMP_TYPE_PARAM_UNIT, G_STRFUNC);
@@ -3645,7 +3645,7 @@ gimp_prop_unit_combo_box_new (GObject     *config,
   GtkWidget    *combo;
   GtkTreeModel *model;
   GimpUnit      unit;
-  GValue        value = { 0, };
+  GValue        value = G_VALUE_INIT;
   gboolean      show_pixels;
   gboolean      show_percent;
 
@@ -3773,7 +3773,7 @@ gimp_prop_unit_menu_new (GObject     *config,
   GParamSpec *param_spec;
   GtkWidget  *menu;
   GimpUnit    unit;
-  GValue      value = { 0, };
+  GValue      value = G_VALUE_INIT;
   gboolean    show_pixels;
   gboolean    show_percent;
 
diff --git a/libgimpwidgets/gimpstringcombobox.c b/libgimpwidgets/gimpstringcombobox.c
index 54df407..5ad373a 100644
--- a/libgimpwidgets/gimpstringcombobox.c
+++ b/libgimpwidgets/gimpstringcombobox.c
@@ -220,7 +220,7 @@ gimp_string_model_lookup (GtkTreeModel *model,
                           const gchar  *id,
                           GtkTreeIter  *iter)
 {
-  GValue    value = { 0, };
+  GValue    value = G_VALUE_INIT;
   gboolean  iter_valid;
 
   /*  This lookup could be backed up by a hash table or some other
diff --git a/libgimpwidgets/gimpunitmenu.c b/libgimpwidgets/gimpunitmenu.c
index c0cfedf..dd45b70 100644
--- a/libgimpwidgets/gimpunitmenu.c
+++ b/libgimpwidgets/gimpunitmenu.c
@@ -447,7 +447,7 @@ gimp_unit_menu_selection_response (GtkWidget    *widget,
       if (menu->selection && gtk_tree_selection_get_selected (sel, &model,
                                                               &iter))
         {
-          GValue   val = { 0, };
+          GValue   val = G_VALUE_INIT;
           GimpUnit unit;
 
           gtk_tree_model_get_value (model, &iter, 2, &val);
diff --git a/libgimpwidgets/gimpunitstore.c b/libgimpwidgets/gimpunitstore.c
index e798599..6e43ef0 100644
--- a/libgimpwidgets/gimpunitstore.c
+++ b/libgimpwidgets/gimpunitstore.c
@@ -854,7 +854,7 @@ gimp_unit_store_get_value (GimpUnitStore *store,
 {
   GimpUnitStorePrivate *private;
   GtkTreeIter          iter;
-  GValue               value = { 0, };
+  GValue               value = G_VALUE_INIT;
 
   g_return_val_if_fail (GIMP_IS_UNIT_STORE (store), 0.0);
 
diff --git a/modules/gimpinputdevicestore-dx.c b/modules/gimpinputdevicestore-dx.c
index 9269258..bb290c5 100644
--- a/modules/gimpinputdevicestore-dx.c
+++ b/modules/gimpinputdevicestore-dx.c
@@ -283,7 +283,7 @@ gimp_input_device_store_lookup (GimpInputDeviceStore *store,
                                 GtkTreeIter          *iter)
 {
   GtkTreeModel *model = GTK_TREE_MODEL (store);
-  GValue        value = { 0, };
+  GValue        value = G_VALUE_INIT;
   gboolean      iter_valid;
 
   for (iter_valid = gtk_tree_model_get_iter_first (model, iter);
@@ -317,7 +317,7 @@ gimp_input_device_store_insert (GimpInputDeviceStore  *store,
 {
   GtkTreeModel *model = GTK_TREE_MODEL (store);
   GtkTreeIter   iter;
-  GValue        value = { 0, };
+  GValue        value = G_VALUE_INIT;
   gint          pos   = 0;
   gboolean      iter_valid;
 
@@ -453,7 +453,7 @@ gimp_input_device_store_get_device_file (GimpInputDeviceStore *store,
                                          const gchar          *udi)
 {
   GtkTreeIter iter;
-  GValue      value = { 0, };
+  GValue      value = G_VALUE_INIT;
 
   g_return_val_if_fail (GIMP_IS_INPUT_DEVICE_STORE (store), NULL);
   g_return_val_if_fail (udi != NULL, NULL);
diff --git a/modules/gimpinputdevicestore-gudev.c b/modules/gimpinputdevicestore-gudev.c
index d10874b..c9c4388 100644
--- a/modules/gimpinputdevicestore-gudev.c
+++ b/modules/gimpinputdevicestore-gudev.c
@@ -193,7 +193,7 @@ gimp_input_device_store_lookup (GimpInputDeviceStore *store,
                                 GtkTreeIter          *iter)
 {
   GtkTreeModel *model = GTK_TREE_MODEL (store);
-  GValue        value = { 0, };
+  GValue        value = G_VALUE_INIT;
   gboolean      iter_valid;
 
   for (iter_valid = gtk_tree_model_get_iter_first (model, iter);
@@ -227,7 +227,7 @@ gimp_input_device_store_insert (GimpInputDeviceStore *store,
 {
   GtkTreeModel *model = GTK_TREE_MODEL (store);
   GtkTreeIter   iter;
-  GValue        value = { 0, };
+  GValue        value = G_VALUE_INIT;
   gint          pos   = 0;
   gboolean      iter_valid;
 
diff --git a/plug-ins/common/file-xmc.c b/plug-ins/common/file-xmc.c
index 465d9b2..acb4b42 100644
--- a/plug-ins/common/file-xmc.c
+++ b/plug-ins/common/file-xmc.c
@@ -1031,7 +1031,7 @@ save_dialog (const gint32   image_ID,
   GtkWidget      *tmpwidget;
   GtkWidget      *label;
   GtkTextBuffer  *textbuffer;
-  GValue          val = {0,};
+  GValue          val = G_VALUE_INIT;
   gint            x1, x2, y1, y2;
   gboolean        run;
 
diff --git a/plug-ins/help-browser/gimpthrobberaction.c b/plug-ins/help-browser/gimpthrobberaction.c
index 2adb17a..04dd993 100644
--- a/plug-ins/help-browser/gimpthrobberaction.c
+++ b/plug-ins/help-browser/gimpthrobberaction.c
@@ -109,7 +109,7 @@ gimp_throbber_action_sync_property (GtkAction  *action,
                                     GtkWidget  *proxy)
 {
   const gchar *property = g_param_spec_get_name (pspec);
-  GValue       value    = { 0, };
+  GValue       value    = G_VALUE_INIT;
 
   g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec));
   g_object_get_property (G_OBJECT (action), property, &value);


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