[virt-viewer] g_getenv returns a const string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When switching from getenv to g_getenv, 'doms' declaration
wasn't changed from char * to const char *, which causes
a gcc warning.
---
 src/virt-viewer-app.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
index 175282c..46af0f8 100644
--- a/src/virt-viewer-app.c
+++ b/src/virt-viewer-app.c
@@ -174,7 +174,7 @@ virt_viewer_app_set_debug(gboolean debug)
 {
 #if GLIB_CHECK_VERSION(2, 31, 0)
     if (debug) {
-        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


[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux