From 01bdaecbc1fcaabdcd30d00ea0001464e631f690 Mon Sep 17 00:00:00 2001 From: rbuj Date: Mon, 21 Dec 2020 09:03:14 +0100 Subject: Remove warning -Wshadow --- savers/floaters.c | 69 +++++++++++++++++++------------------------------------ 1 file changed, 23 insertions(+), 46 deletions(-) (limited to 'savers') diff --git a/savers/floaters.c b/savers/floaters.c index 99b99a1..d1e7cc9 100644 --- a/savers/floaters.c +++ b/savers/floaters.c @@ -74,49 +74,6 @@ #define GAMMA 2.2 #endif -static gboolean should_show_paths = FALSE; -static gboolean should_do_rotations = FALSE; -static gboolean should_print_stats = FALSE; -static gint max_floater_count = FLOATER_DEFAULT_COUNT; -static gchar *geometry = NULL; -static gchar **filenames = NULL; - -static GOptionEntry options[] = -{ - { - "show-paths", 'p', 0, G_OPTION_ARG_NONE, &should_show_paths, - N_("Show paths that images follow"), NULL - }, - - { - "do-rotations", 'r', 0, G_OPTION_ARG_NONE, &should_do_rotations, - N_("Occasionally rotate images as they move"), NULL - }, - - { - "print-stats", 's', 0, G_OPTION_ARG_NONE, &should_print_stats, - N_("Print out frame rate and other statistics"), NULL - }, - - { - "number-of-images", 'n', 0, G_OPTION_ARG_INT, &max_floater_count, - N_("The maximum number of images to keep on screen"), N_("MAX_IMAGES") - }, - - { - "geometry", 0, 0, G_OPTION_ARG_STRING, &geometry, - N_("The initial size and position of window"), N_("WIDTHxHEIGHT+X+Y") - }, - - { - G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &filenames, - N_("The source image to use"), NULL - }, - - {NULL} -}; - - typedef struct _Point Point; typedef struct _Path Path; typedef struct _Rectangle Rectangle; @@ -1170,9 +1127,29 @@ main (int argc, ScreenSaver *screen_saver; GtkWidget *window; GtkWidget *drawing_area; - GError *error; - - error = NULL; + gboolean should_show_paths = FALSE; + gboolean should_do_rotations = FALSE; + gboolean should_print_stats = FALSE; + gint max_floater_count = FLOATER_DEFAULT_COUNT; + gchar *geometry = NULL; + gchar **filenames = NULL; + GError *error = NULL; + + GOptionEntry options[] = { + { "show-paths", 'p', 0, G_OPTION_ARG_NONE, &should_show_paths, + N_("Show paths that images follow"), NULL }, + { "do-rotations", 'r', 0, G_OPTION_ARG_NONE, &should_do_rotations, + N_("Occasionally rotate images as they move"), NULL }, + { "print-stats", 's', 0, G_OPTION_ARG_NONE, &should_print_stats, + N_("Print out frame rate and other statistics"), NULL }, + { "number-of-images", 'n', 0, G_OPTION_ARG_INT, &max_floater_count, + N_("The maximum number of images to keep on screen"), N_("MAX_IMAGES") }, + { "geometry", 0, 0, G_OPTION_ARG_STRING, &geometry, + N_("The initial size and position of window"), N_("WIDTHxHEIGHT+X+Y") }, + { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &filenames, + N_("The source image to use"), NULL }, + {NULL} + }; bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); -- cgit v1.2.1