[PATCH 1/2] remote-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>

remote-viewer-main.c: In function 'main':
remote-viewer-main.c:263:15: warning: declaration of 'basename' shadows a global declaration [-Wshadow]

Use 'path' instead of 'basename'.

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

diff --git a/src/remote-viewer-main.c b/src/remote-viewer-main.c
index 615e758..f739d6b 100644
--- a/src/remote-viewer-main.c
+++ b/src/remote-viewer-main.c
@@ -260,11 +260,11 @@ main(int argc, char **argv)
 #endif
     g_option_context_parse (context, &argc, &argv, &error);
     if (error) {
-        char *basename;
-        basename = g_path_get_basename(argv[0]);
+        char *path;
+        path = g_path_get_basename(argv[0]);
         g_printerr(_("%s\nRun '%s --help' to see a full list of available command line options\n"),
-                   error->message, basename);
-        g_free(basename);
+                   error->message, path);
+        g_free(path);
         g_error_free(error);
         goto cleanup;
     }
-- 
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