From eed336233cb5b4015a625fb5c6193f5a3284d46a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 7 Mar 2019 10:56:15 +0100 Subject: [PATCH 1/2] build-sys: disable -Wstring-plus-int clang-8 warns about constructs like "foobar"+3 (to get "bar"). We like to use patterns like this, so let's just disable the warning. --- meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index ae2ef48231..3d8220e154 100644 --- a/meson.build +++ b/meson.build @@ -336,7 +336,8 @@ possible_cc_flags = [ '-Wno-missing-field-initializers', '-Wno-unused-result', '-Wno-format-signedness', - '-Wno-error=#warnings', + '-Wno-error=#warnings', # clang + '-Wno-string-plus-int', # clang # work-around for gcc 7.1 turning this on on its own. '-Wno-error=nonnull', From 2bd061a48b367dc82f11615b5b7422969e2de674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 7 Mar 2019 10:56:38 +0100 Subject: [PATCH 2/2] test-execute: avoid undefined variable warning when compiled w/o seccomp --- src/test/test-execute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/test-execute.c b/src/test/test-execute.c index 1957112159..b34b207a40 100644 --- a/src/test/test-execute.c +++ b/src/test/test-execute.c @@ -714,7 +714,6 @@ static int run_tests(UnitFileScope scope, const test_function_t *tests) { int main(int argc, char *argv[]) { _cleanup_(rm_rf_physical_and_freep) char *runtime_dir = NULL; _cleanup_free_ char *test_execute_path = NULL; - _cleanup_hashmap_free_ Hashmap *s = NULL; static const test_function_t user_tests[] = { test_exec_basic, test_exec_ambientcapabilities, @@ -812,6 +811,7 @@ int main(int argc, char *argv[]) { return 0; } + _cleanup_hashmap_free_ Hashmap *s = NULL; assert_se(s = hashmap_new(NULL)); r = seccomp_syscall_resolve_name("unshare"); assert_se(r != __NR_SCMP_ERROR);