nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit d9db6b045c30852b1c38da7c7e25150eeff005d7
parent 5f5ee10e94d92c4cfbc5112394bc38b55d5a5f9e
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Sat, 10 Jul 2021 02:08:48 +0530

Fix #1102: suppress clang unused variable warnings

Diffstat:
Msrc/nnn.c | 12++++--------
1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/nnn.c b/src/nnn.c @@ -808,12 +808,6 @@ static haiku_nm_h haiku_hnd; #define ENTSORT(pdents, ndents, entrycmpfn) qsort((pdents), (ndents), sizeof(*(pdents)), (entrycmpfn)) #endif -#ifdef __GNUC__ -#define UNUSED(x) UNUSED_##x __attribute__((__unused__)) -#else -#define UNUSED(x) UNUSED_##x -#endif /* __GNUC__ */ - /* Forward declarations */ static void redraw(char *path); static int spawn(char *file, char *arg1, char *arg2, char *arg3, ushort_t flag); @@ -826,13 +820,15 @@ static void notify_fifo(bool force); /* Functions */ -static void sigint_handler(int UNUSED(sig)) +static void sigint_handler(int sig) { + (void) sig; g_state.interrupt = 1; } -static void clean_exit_sighandler(int UNUSED(sig)) +static void clean_exit_sighandler(int sig) { + (void) sig; exitcurses(); /* This triggers cleanup() thanks to atexit() */ exit(EXIT_SUCCESS);