When compiling a gnulib testdir with CC="gcc -std=gnu99 -pedantic" I see
this warning:
test-argmatch.c:64:48: warning: ISO C does not allow extra ‘;’ outside of a
function [-Wpedantic]
ARGMATCH_DEFINE_GROUP(backup, enum backup_type);
^
This patch should fix it. It is probably preferrable to adding
typedef int dummy_ ## __LINE__
at the end of the macro.
2020-09-05 Bruno Haible <[email protected]>
argmatch tests: Fix ISO C compliance warning.
* tests/test-argmatch.c: Omit semicolon after ARGMATCH_DEFINE_GROUP
invocation.
diff --git a/tests/test-argmatch.c b/tests/test-argmatch.c
index 24a0500..89a62ef 100644
--- a/tests/test-argmatch.c
+++ b/tests/test-argmatch.c
@@ -61,7 +61,7 @@ static const enum backup_type backup_vals[] =
numbered_backups, numbered_backups, numbered_backups
};
-ARGMATCH_DEFINE_GROUP(backup, enum backup_type);
+ARGMATCH_DEFINE_GROUP(backup, enum backup_type)
static const argmatch_backup_doc argmatch_backup_docs[] =
{