[virt-tools-list] [PATCH 2/2] virt-viewer: Fix build warning due to shadow declaration
Luiz Capitulino
lcapitulino at redhat.com
Tue Sep 18 19:02:42 UTC 2012
From: Luiz Capitulino <lcapitulino at gmail.com>
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 at gmail.com>
---
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
More information about the virt-tools-list
mailing list