[Spice-devel] [spice-gtk] g_getenv returns a const string
Christophe Fergeau
cfergeau at redhat.com
Fri Apr 27 06:14:42 PDT 2012
When switching from getenv to g_getenv, 'doms' declaration
wasn't changed from char * to const char *, which causes
a gcc warning.
---
gtk/spice-util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gtk/spice-util.c b/gtk/spice-util.c
index 62c6549..8f4f1dc 100644
--- a/gtk/spice-util.c
+++ b/gtk/spice-util.c
@@ -49,7 +49,7 @@ void spice_util_set_debug(gboolean enabled)
{
#if GLIB_CHECK_VERSION(2, 31, 0)
if (enabled) {
- gchar *doms = g_getenv("G_MESSAGES_DEBUG");
+ const gchar *doms = g_getenv("G_MESSAGES_DEBUG");
if (!doms) {
g_setenv("G_MESSAGES_DEBUG", G_LOG_DOMAIN, 1);
} else if (!strstr(doms, G_LOG_DOMAIN)) {
--
1.7.10
More information about the Spice-devel
mailing list