From: Laszlo Ersek Date: Sun, 11 Sep 2022 12:36:26 +0000 (+0200) Subject: tests: add "missing" initializers X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=45a7c4d5ed0afd47e0df2f444d33683e17ae53b9;p=miniexpect.git tests: add "missing" initializers With "-Wextra", gcc emits warnings such as: > test-multi-match.c:58:24: warning: missing initializer for field > ‘options’ of ‘mexp_regexp’ [-Wmissing-field-initializers] Although the code is not incorrect, let's just shut up the warnings, so we can enable "-Wextra" later (which did catch an actual bug; see the previous patch). Signed-off-by: Laszlo Ersek --- diff --git a/test-ls-version.c b/test-ls-version.c index 550f1a4..4ce07a3 100644 --- a/test-ls-version.c +++ b/test-ls-version.c @@ -56,8 +56,8 @@ main (int argc, char *argv[]) switch (mexp_expect (h, (mexp_regexp[]) { - { 100, ls_coreutils_re }, - { 101, ls_busybox_re }, + { 100, ls_coreutils_re, 0 }, + { 101, ls_busybox_re, 0 }, { 0 }, }, match_data)) { case 100: diff --git a/test-multi-match.c b/test-multi-match.c index dd36c72..bc40b37 100644 --- a/test-multi-match.c +++ b/test-multi-match.c @@ -51,11 +51,11 @@ main (int argc, char *argv[]) for (i = 0; i < 5; ++i) { r = mexp_expect (h, (mexp_regexp[]) { - { 100, multi_re }, - { 101, match_re }, - { 102, ing_re }, - { 103, str_re }, - { 104, s_re }, + { 100, multi_re, 0 }, + { 101, match_re, 0 }, + { 102, ing_re, 0 }, + { 103, str_re, 0 }, + { 104, s_re, 0 }, { 0 }, }, match_data); switch (r) {