From 1ca906008ecfd94077a0fe1c607f13a8de83d4b8 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Tue, 9 Oct 2018 16:22:28 +0800 Subject: [PATCH] testsuite/gtk/[flatten|sort]listmodel.c: Avoid VLA usage Visual Studio is unlikely to support VLAs at any point, so avoid using them and use g_newa() instead. --- testsuite/gtk/flattenlistmodel.c | 2 +- testsuite/gtk/sortlistmodel.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/testsuite/gtk/flattenlistmodel.c b/testsuite/gtk/flattenlistmodel.c index f522f1e121..c06e30b350 100644 --- a/testsuite/gtk/flattenlistmodel.c +++ b/testsuite/gtk/flattenlistmodel.c @@ -61,7 +61,7 @@ splice (GListStore *store, guint *numbers, guint added) { - GObject *objects[added]; + GObject **objects = g_newa (GObject *, added); guint i; for (i = 0; i < added; i++) diff --git a/testsuite/gtk/sortlistmodel.c b/testsuite/gtk/sortlistmodel.c index 31a6711f04..1b54d0b976 100644 --- a/testsuite/gtk/sortlistmodel.c +++ b/testsuite/gtk/sortlistmodel.c @@ -56,7 +56,7 @@ splice (GListStore *store, guint *numbers, guint added) { - GObject *objects[added]; + GObject **objects = g_newa (GObject *, added); guint i; for (i = 0; i < added; i++)