]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Merge pull request #11918 from keszybz/clang-8
authorLennart Poettering <lennart@poettering.net>
Thu, 7 Mar 2019 13:41:44 +0000 (14:41 +0100)
committerGitHub <noreply@github.com>
Thu, 7 Mar 2019 13:41:44 +0000 (14:41 +0100)
Two trivial changes to build with clang 8

meson.build
src/test/test-execute.c

index ae2ef48231ed11ff9b7d062218531ce128f7887b..3d8220e1549a271ebb45b2d11744371eff350c6e 100644 (file)
@@ -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',
index 195711215938dcc69cd9a6743a5742d49cbf5c5e..b34b207a40824740f6cf79da52611bd30209dc56 100644 (file)
@@ -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);