From 9b199b32535b6b28ea3845a975deac23465e5c16 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Fri, 14 Feb 2020 18:48:44 +0530 Subject: Remove redundant mouse mask variable --- src/nnn.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/nnn.c b/src/nnn.c index 1a85895..2285178 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -1372,7 +1372,7 @@ static bool selsafe(void) } /* Initialize curses mode */ -static bool initcurses(mmask_t *oldmask) +static bool initcurses(void *oldmask) { short i; char *colors = xgetenv(env_cfg[NNN_COLORS], "4444"); @@ -1399,9 +1399,9 @@ static bool initcurses(mmask_t *oldmask) keypad(stdscr, TRUE); #ifndef NOMOUSE #if NCURSES_MOUSE_VERSION <= 1 - mousemask(BUTTON1_PRESSED | BUTTON1_DOUBLE_CLICKED, oldmask); + mousemask(BUTTON1_PRESSED | BUTTON1_DOUBLE_CLICKED, (mmask_t *)oldmask); #else - mousemask(BUTTON1_PRESSED | BUTTON4_PRESSED | BUTTON5_PRESSED, oldmask); + mousemask(BUTTON1_PRESSED | BUTTON4_PRESSED | BUTTON5_PRESSED, (mmask_t *)oldmask); #endif mouseinterval(0); #endif @@ -6443,10 +6443,12 @@ static void cleanup(void) int main(int argc, char *argv[]) { - mmask_t mask; char *arg = NULL; char *session = NULL; int opt; +#ifndef NOMOUSE + mmask_t mask; +#endif while ((opt = getopt(argc, argv, "aAb:cdeEgHKnop:QrRs:St:vVxh")) != -1) { switch (opt) { @@ -6739,7 +6741,11 @@ int main(int argc, char *argv[]) read_history(g_buf); #endif +#ifndef NOMOUSE if (!initcurses(&mask)) +#else + if (!initcurses(NULL)) +#endif return _FAILURE; opt = browse(initpath, session); -- cgit v1.2.3-70-g09d2