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

Re: [virt-tools-list] [virt-viewer] g_getenv returns a const string



ACK.

On 04/27/2012 03:21 PM, Christophe Fergeau wrote:
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)) {


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