mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer
synced 2025-12-27 23:00:54 +00:00
Rename variable, fix gcc warning
virt-viewer-main.c:61: warning: declaration of 'basename' shadows a global declaration
This commit is contained in:
parent
d0d8a9fba0
commit
ccd2882cce
@ -246,11 +246,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 *base_name;
|
||||
base_name = 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, base_name);
|
||||
g_free(base_name);
|
||||
g_error_free(error);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ int main(int argc, char **argv)
|
||||
gboolean reconnect = FALSE;
|
||||
gboolean fullscreen = FALSE;
|
||||
VirtViewer *viewer = NULL;
|
||||
char *basename;
|
||||
char *base_name;
|
||||
char *help_msg = NULL;
|
||||
const GOptionEntry options [] = {
|
||||
{ "version", 'V', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
|
||||
@ -90,10 +90,10 @@ int main(int argc, char **argv)
|
||||
|
||||
virt_viewer_util_init(_("Virt Viewer"));
|
||||
|
||||
basename = g_path_get_basename(argv[0]);
|
||||
base_name = 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);
|
||||
base_name);
|
||||
g_free(base_name);
|
||||
|
||||
/* Setup command line options */
|
||||
context = g_option_context_new (_("- Virtual machine graphical console"));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user