From 89edc243e4b50094df4cef81a7637a9c6a38962a Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 14 Sep 2021 23:13:23 +0200 Subject: [PATCH] test: make array in test-sysctl fully read-only --- src/test/test-sysctl-util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/test-sysctl-util.c b/src/test/test-sysctl-util.c index a6f449b7647..991a1e33630 100644 --- a/src/test/test-sysctl-util.c +++ b/src/test/test-sysctl-util.c @@ -4,7 +4,7 @@ #include "sysctl-util.h" #include "tests.h" -static const char* cases[] = { +static const char* const cases[] = { "a.b.c", "a/b/c", "a/b/c", "a/b/c", "a/b.c/d", "a/b.c/d", @@ -24,7 +24,7 @@ static void test_sysctl_normalize(void) { log_info("/* %s */", __func__); const char **s, **expected; - STRV_FOREACH_PAIR(s, expected, cases) { + STRV_FOREACH_PAIR(s, expected, (const char**) cases) { _cleanup_free_ char *t; assert_se(t = strdup(*s));