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'.
This commit is contained in:
Bernhard Voelker 2017-11-03 01:10:36 +01:00
parent cd61e9f7ac
commit ff4701b4ef
2 changed files with 5 additions and 2 deletions

View File

@ -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)
{

View File

@ -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 ();