Merge pull request #486 from smcv/unused

Annotate some variables as sometimes-unused
This commit is contained in:
Simon McVittie
2022-05-11 14:54:27 +01:00
committed by GitHub
2 changed files with 5 additions and 5 deletions

View File

@@ -2552,7 +2552,7 @@ main (int argc,
struct stat sbuf; struct stat sbuf;
uint64_t val; uint64_t val;
int res UNUSED; int res UNUSED;
cleanup_free char *args_data = NULL; cleanup_free char *args_data UNUSED = NULL;
int intermediate_pids_sockets[2] = {-1, -1}; int intermediate_pids_sockets[2] = {-1, -1};
/* Handle --version early on before we try to acquire/drop /* Handle --version early on before we try to acquire/drop

View File

@@ -82,7 +82,7 @@ die (const char *format, ...)
} }
void void
die_unless_label_valid (const char *label) die_unless_label_valid (UNUSED const char *label)
{ {
#ifdef HAVE_SELINUX #ifdef HAVE_SELINUX
if (is_selinux_enabled () == 1) if (is_selinux_enabled () == 1)
@@ -854,7 +854,7 @@ pivot_root (const char * new_root, const char * put_old)
} }
char * char *
label_mount (const char *opt, const char *mount_label) label_mount (const char *opt, UNUSED const char *mount_label)
{ {
#ifdef HAVE_SELINUX #ifdef HAVE_SELINUX
if (mount_label) if (mount_label)
@@ -871,7 +871,7 @@ label_mount (const char *opt, const char *mount_label)
} }
int int
label_create_file (const char *file_label) label_create_file (UNUSED const char *file_label)
{ {
#ifdef HAVE_SELINUX #ifdef HAVE_SELINUX
if (is_selinux_enabled () > 0 && file_label) if (is_selinux_enabled () > 0 && file_label)
@@ -881,7 +881,7 @@ label_create_file (const char *file_label)
} }
int int
label_exec (const char *exec_label) label_exec (UNUSED const char *exec_label)
{ {
#ifdef HAVE_SELINUX #ifdef HAVE_SELINUX
if (is_selinux_enabled () > 0 && exec_label) if (is_selinux_enabled () > 0 && exec_label)