When HAVE_SECCOMP is not set, a build error happens:
../src/analyze/analyze-security.c: In function ‘get_security_info’:
../src/analyze/analyze-security.c:2449:13: error: unused variable ‘r’ [-Werror=unused-variable]
2449 | int r;
| ^
cc1: some warnings being treated as errors
Fix it by removing the sometimes unused variable.
/* Refactoring SecurityInfo so that it can make use of existing struct variables instead of reading from dbus */
static int get_security_info(Unit *u, ExecContext *c, CGroupContext *g, SecurityInfo **ret_info) {
- int r;
-
assert(ret_info);
_cleanup_(security_info_freep) SecurityInfo *info = security_info_new();
info->_umask = c->umask;
#if HAVE_SECCOMP
- r = dlopen_libseccomp();
- if (r >= 0) {
+ if (dlopen_libseccomp() >= 0) {
SET_FOREACH(key, c->syscall_archs) {
const char *name;