From 6012de5db5d436f242a41cc8dddf6a9be18e66f2 Mon Sep 17 00:00:00 2001 From: Thomas Adam Date: Sat, 11 Jul 2020 22:24:11 +0100 Subject: [PATCH] Fix compiler warnings Fix some trivial warnings. --- fvwm/add_window.c | 1 - fvwm/events.c | 1 - modules/FvwmPager/FvwmPager.c | 7 ++++--- modules/FvwmPager/FvwmPager.h | 1 - 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/fvwm/add_window.c b/fvwm/add_window.c index f10454fdc..ba3e0aebf 100644 --- a/fvwm/add_window.c +++ b/fvwm/add_window.c @@ -141,7 +141,6 @@ static void CaptureOneWindow( Window keep_on_top_win, Window parent_win, Bool is_recapture) { Window w; - struct monitor *m = (fw && fw->m) ? fw->m : monitor_get_current(); unsigned long data[1]; initial_window_options_t win_opts; evh_args_t ea; diff --git a/fvwm/events.c b/fvwm/events.c index 621e5343b..cfabfb0b8 100644 --- a/fvwm/events.c +++ b/fvwm/events.c @@ -2444,7 +2444,6 @@ void HandleFocusIn(const evh_args_t *ea) static Window last_focus_fw = None; static Bool was_nothing_ever_focused = True; FvwmWindow *fw = ea->exc->w.fw; - struct monitor *mon = monitor_get_current(); Scr.focus_in_pending_window = NULL; /* This is a hack to make the PointerKey command work */ diff --git a/modules/FvwmPager/FvwmPager.c b/modules/FvwmPager/FvwmPager.c index 395132b1c..3a197c69c 100644 --- a/modules/FvwmPager/FvwmPager.c +++ b/modules/FvwmPager/FvwmPager.c @@ -151,6 +151,7 @@ Bool do_ignore_next_button_release = False; Bool error_occured = False; Bool Swallowed = False; +static void extract_monitor_config(struct fpmonitor *, char *); static void SetDeskLabel(struct fpmonitor *, int desk, const char *label); static RETSIGTYPE TerminateHandler(int); void ExitPager(void); @@ -1805,7 +1806,7 @@ void ParseOptions(void) char *token; char *next; Bool MoveThresholdSetForModule = False; - struct fpmonitor *m, *m2; + struct fpmonitor *m = NULL, *m2 = NULL; arg1 = arg2 = NULL; @@ -1874,7 +1875,7 @@ void ParseOptions(void) TAILQ_FOREACH(m2, &fp_monitor_q, entry) { updated = 0; if (strcmp(m2->name, mname) == 0) { - extract_monitor_config(m2, next); + extract_monitor_config(m2, next); updated = 1; } } @@ -1885,7 +1886,7 @@ void ParseOptions(void) m = fxcalloc(1, sizeof(*m)); m->name = fxstrdup(mname); - extract_monitor_config(m, next); + extract_monitor_config(m, next); TAILQ_INSERT_TAIL(&fp_monitor_q, m, entry); continue; } diff --git a/modules/FvwmPager/FvwmPager.h b/modules/FvwmPager/FvwmPager.h index a193480a3..c5edbf365 100644 --- a/modules/FvwmPager/FvwmPager.h +++ b/modules/FvwmPager/FvwmPager.h @@ -169,7 +169,6 @@ RETSIGTYPE DeadPipe(int nonsense); void process_message(FvwmPacket*); void ParseOptions(void); -static void extract_monitor_config(struct fpmonitor *, char *); void list_add(unsigned long *body); void list_configure(unsigned long *body); void list_config_info(unsigned long *body);