From ff4701b4ef65a8baba43754125e2cf4777eaf55a Mon Sep 17 00:00:00 2001 From: Bernhard Voelker Date: Fri, 3 Nov 2017 01:10:36 +0100 Subject: [PATCH] maint: avoid unused-but-set-variable, unused-parameter warnings from GCC 7 GCC-7.2.1 complained about this occur during 'make check'. * lib/regexprops.c (menu): Remove set-but-unused-variable 'options'. * lib/test_splitstring.c (main): Avoid unused-parameter warnings for 'argc' and 'argv'. --- lib/regexprops.c | 4 ++-- lib/test_splitstring.c | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/regexprops.c b/lib/regexprops.c index 048315e7..fcbdd5db 100644 --- a/lib/regexprops.c +++ b/lib/regexprops.c @@ -478,12 +478,12 @@ ignore (int ix, const unsigned int context) static void menu (unsigned int context) { - int i, options; + int i; const char *name; output ("@menu\n", 0); for (i=0; - options = get_regex_type_flags (i), + get_regex_type_flags (i), name=get_regex_type_name (i); ++i) { diff --git a/lib/test_splitstring.c b/lib/test_splitstring.c index b01b6b79..0feb089e 100644 --- a/lib/test_splitstring.c +++ b/lib/test_splitstring.c @@ -196,6 +196,9 @@ static void test_consecutive_empty (void) int main (int argc, char *argv[]) { + (void) argc; /* pacify -Werror=unused-parameter */ + (void) argv; /* pacify -Werror=unused-parameter */ + test_empty (); test_onefield (); test_not_colon ();