From 45a7c4d5ed0afd47e0df2f444d33683e17ae53b9 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Sun, 11 Sep 2022 14:36:26 +0200 Subject: [PATCH] tests: add "missing" initializers MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- test-ls-version.c | 4 ++-- test-multi-match.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) 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) { -- 1.8.3.1