[Spice-commits] gtk/spice-util.c

Christophe Fergau teuf at kemper.freedesktop.org
Fri Apr 27 08:07:06 PDT 2012


 gtk/spice-util.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 312b55a79c65f8f19955a25eb5632c5f9f4a60aa
Author: Christophe Fergeau <cfergeau at redhat.com>
Date:   Fri Apr 27 15:13:12 2012 +0200

    g_getenv returns a const string
    
    When switching from getenv to g_getenv, 'doms' declaration
    wasn't changed from char * to const char *, which causes
    a gcc warning.

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)) {


More information about the Spice-commits mailing list