gtestdbus: Fix non-const use of const variables
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Tue, 12 Nov 2013 13:10:33 +0000 (13:10 +0000)
committerPhilip Withnall <philip.withnall@collabora.co.uk>
Fri, 29 Nov 2013 08:11:13 +0000 (08:11 +0000)
The argv array should be declared as const.

https://bugzilla.gnome.org/show_bug.cgi?id=712148

gio/gtestdbus.c

index d84a600..90dbb8d 100644 (file)
@@ -586,7 +586,7 @@ write_config_file (GTestDBus *self)
 static void
 start_daemon (GTestDBus *self)
 {
-  gchar *argv[] = {"dbus-daemon", "--print-address", "--config-file=foo", NULL};
+  const gchar *argv[] = {"dbus-daemon", "--print-address", "--config-file=foo", NULL};
   gchar *config_path;
   gchar *config_arg;
   gint stdout_fd;
@@ -604,7 +604,7 @@ start_daemon (GTestDBus *self)
 
   /* Spawn dbus-daemon */
   g_spawn_async_with_pipes (NULL,
-                            argv,
+                            (gchar **) argv,
                             NULL,
 #ifdef G_OS_WIN32
                             /* We Need this to get the pid returned on win32 */