[PATCH 2/2] virt-viewer: Fix build warning due to shadow declaration

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

 



From: Luiz Capitulino <lcapitulino@xxxxxxxxx>

virt-viewer-main.c: In function 'main':
virt-viewer-main.c:60:11: warning: declaration of 'basename' shadows a global declaration [-Wshadow]

Signed-off-by: Luiz Capitulino <lcapitulino@xxxxxxxxx>
---
 src/virt-viewer-main.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/virt-viewer-main.c b/src/virt-viewer-main.c
index bf938c4..b9f3235 100644
--- a/src/virt-viewer-main.c
+++ b/src/virt-viewer-main.c
@@ -57,7 +57,7 @@ int main(int argc, char **argv)
     gboolean reconnect = FALSE;
     gboolean fullscreen = FALSE;
     VirtViewer *viewer = NULL;
-    char *basename;
+    char *path;
     char *help_msg = NULL;
     const GOptionEntry options [] = {
         { "version", 'V', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
@@ -97,10 +97,10 @@ int main(int argc, char **argv)
     g_set_application_name(_("Virt Viewer"));
 
 
-    basename = g_path_get_basename(argv[0]);
+    path = g_path_get_basename(argv[0]);
     help_msg = g_strdup_printf(_("Run '%s --help' to see a full list of available command line options"),
-                               basename);
-    g_free(basename);
+                               path);
+    g_free(path);
 
     /* Setup command line options */
     context = g_option_context_new (_("- Virtual machine graphical console"));
-- 
1.7.12.315.g682ce8b


[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