[gtk/ci-jobs] Conditionally compile validate_gnode()



commit d0e2fd924262dbdec240f351c1564481383cee09
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Wed Jan 29 14:05:20 2020 +0100

    Conditionally compile validate_gnode()
    
    This function is only ever used in debug builds, so it should be
    declared and defined only if G_ENABLE_DEBUG is set.

 gtk/gtktreestore.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gtk/gtktreestore.c b/gtk/gtktreestore.c
index 20d5dafbca..a416ec8698 100644
--- a/gtk/gtktreestore.c
+++ b/gtk/gtktreestore.c
@@ -184,7 +184,9 @@ static void     gtk_tree_store_buildable_custom_finished  (GtkBuildable       *b
                                                            const gchar        *tagname,
                                                            gpointer            user_data);
 
+#ifdef G_ENABLE_DEBUG
 static void     validate_gnode                         (GNode *node);
+#endif
 
 static void     gtk_tree_store_move                    (GtkTreeStore           *tree_store,
                                                         GtkTreeIter            *iter,
@@ -3297,6 +3299,7 @@ gtk_tree_store_has_default_sort_func (GtkTreeSortable *sortable)
   return (tree_store->priv->default_sort_func != NULL);
 }
 
+#ifdef G_ENABLE_DEBUG
 static void
 validate_gnode (GNode* node)
 {
@@ -3312,6 +3315,7 @@ validate_gnode (GNode* node)
       iter = iter->next;
     }
 }
+#endif
 
 /* GtkBuildable custom tag implementation
  *


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