From: Zbigniew Jędrzejewski-Szmek Date: Wed, 22 Apr 2020 21:27:51 +0000 (+0200) Subject: core: fix unused variable warning when !HAVE_SECCOMP X-Git-Tag: v246-rc1~512^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f3e342fa9d14ad68143f364231069e8c4074f02;p=thirdparty%2Fsystemd.git core: fix unused variable warning when !HAVE_SECCOMP --- diff --git a/src/core/execute.c b/src/core/execute.c index b5f77a15e41..ef4815440a3 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -1647,8 +1647,6 @@ static int apply_lock_personality(const Unit* u, const ExecContext *c) { #endif static int apply_protect_hostname(const Unit *u, const ExecContext *c, int *ret_exit_status) { - int r; - assert(u); assert(c); @@ -1668,6 +1666,8 @@ static int apply_protect_hostname(const Unit *u, const ExecContext *c, int *ret_ log_unit_warning(u, "ProtectHostname=yes is configured, but the kernel does not support UTS namespaces, ignoring namespace setup."); #if HAVE_SECCOMP + int r; + if (skip_seccomp_unavailable(u, "ProtectHostname=")) return 0;