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

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



From: Luiz Capitulino <lcapitulino gmail com>

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 gmail com>
---
 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


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