From ca95dec6595979e46e27e362926e9e48be1f18c9 Mon Sep 17 00:00:00 2001 From: Andreas Mohr Date: Tue, 31 Mar 2015 20:45:04 +0300 Subject: [PATCH] Ticket #3428: fix -Wredundant-decls compiler warnings... ...and use compiler option for future compile checks. Signed-off-by: Andrew Borodin --- lib/filehighlight/ini-file-read.c | 2 -- lib/skin/internal.h | 2 -- lib/tty/tty-slang.c | 2 -- m4.include/mc-cflags.m4 | 1 + 4 files changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/filehighlight/ini-file-read.c b/lib/filehighlight/ini-file-read.c index 7f4dde26b..a3f9dcd5a 100644 --- a/lib/filehighlight/ini-file-read.c +++ b/lib/filehighlight/ini-file-read.c @@ -38,8 +38,6 @@ /*** global variables ****************************************************************************/ -extern mc_skin_t mc_skin__default; - /*** file scope macro definitions ****************************************************************/ /*** file scope type declarations ****************************************************************/ diff --git a/lib/skin/internal.h b/lib/skin/internal.h index cb02bf7e4..c12b34105 100644 --- a/lib/skin/internal.h +++ b/lib/skin/internal.h @@ -20,8 +20,6 @@ typedef struct mc_skin_color_struct /*** global variables defined in .c file *********************************************************/ -extern mc_skin_t mc_skin__default; - /*** declarations of public functions ************************************************************/ gboolean mc_skin_ini_file_load (mc_skin_t *); diff --git a/lib/tty/tty-slang.c b/lib/tty/tty-slang.c index db5375fbf..dfb0fa8e9 100644 --- a/lib/tty/tty-slang.c +++ b/lib/tty/tty-slang.c @@ -57,8 +57,6 @@ /*** global variables ****************************************************************************/ -extern int reset_hp_softkeys; - /*** file scope macro definitions ****************************************************************/ #ifndef SLTT_MAX_SCREEN_COLS diff --git a/m4.include/mc-cflags.m4 b/m4.include/mc-cflags.m4 index 30922cef8..8831ae40d 100644 --- a/m4.include/mc-cflags.m4 +++ b/m4.include/mc-cflags.m4 @@ -63,6 +63,7 @@ dnl MC_CHECK_ONE_CFLAG([-Wbad-function-cast]) MC_CHECK_ONE_CFLAG([-Wno-unreachable-code]) MC_CHECK_ONE_CFLAG([-Wparentheses]) MC_CHECK_ONE_CFLAG([-Wpointer-sign]) + MC_CHECK_ONE_CFLAG([-Wredundant-decls]) MC_CHECK_ONE_CFLAG([-Wreturn-type]) MC_CHECK_ONE_CFLAG([-Wsequence-point]) MC_CHECK_ONE_CFLAG([-Wshadow])