[glib] gtestdbus: Fix non-const use of const variables
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gtestdbus: Fix non-const use of const variables
- Date: Fri, 29 Nov 2013 08:11:44 +0000 (UTC)
commit 46c1aea0e7d77581ced8ebd064b5a886417f7371
Author: Philip Withnall <philip withnall collabora co uk>
Date: Tue Nov 12 13:10:33 2013 +0000
gtestdbus: Fix non-const use of const variables
The argv array should be declared as const.
https://bugzilla.gnome.org/show_bug.cgi?id=712148
gio/gtestdbus.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gio/gtestdbus.c b/gio/gtestdbus.c
index d84a600..90dbb8d 100644
--- a/gio/gtestdbus.c
+++ b/gio/gtestdbus.c
@@ -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 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]