[gtk/wip/otte/dnd] tests: Guard variables with necessary macros
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/dnd] tests: Guard variables with necessary macros
- Date: Sat, 22 Feb 2020 06:45:54 +0000 (UTC)
commit 8a098b1343dc2f03fe72d6b2cb4841c23901cf5f
Author: Benjamin Otte <otte redhat com>
Date: Sat Feb 22 07:44:16 2020 +0100
tests: Guard variables with necessary macros
tests/testtreecolumns.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/tests/testtreecolumns.c b/tests/testtreecolumns.c
index 6ad42964a5..74f55a3c19 100644
--- a/tests/testtreecolumns.c
+++ b/tests/testtreecolumns.c
@@ -157,11 +157,13 @@ view_column_model_get_value (GtkTreeModel *tree_model,
gint column,
GValue *value)
{
+#ifndef G_DISABLE_CHECKS
ViewColumnModel *view_model = (ViewColumnModel *)tree_model;
g_return_if_fail (column < 2);
g_return_if_fail (view_model->stamp == iter->stamp);
g_return_if_fail (iter->user_data != NULL);
+#endif
if (column == 0)
{
@@ -179,10 +181,12 @@ static gboolean
view_column_model_iter_next (GtkTreeModel *tree_model,
GtkTreeIter *iter)
{
+#ifndef G_DISABLE_CHECKS
ViewColumnModel *view_model = (ViewColumnModel *)tree_model;
g_return_val_if_fail (view_model->stamp == iter->stamp, FALSE);
g_return_val_if_fail (iter->user_data != NULL, FALSE);
+#endif
iter->user_data = ((GList *)iter->user_data)->next;
return iter->user_data != NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]