Skip to content

Commit

Permalink
Merge pull request #486 from smcv/unused
Browse files Browse the repository at this point in the history
Annotate some variables as sometimes-unused
  • Loading branch information
smcv authored May 11, 2022
2 parents 5ba8fc3 + d4554fc commit b9d0ac3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bubblewrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2552,7 +2552,7 @@ main (int argc,
struct stat sbuf;
uint64_t val;
int res UNUSED;
cleanup_free char *args_data = NULL;
cleanup_free char *args_data UNUSED = NULL;
int intermediate_pids_sockets[2] = {-1, -1};

/* Handle --version early on before we try to acquire/drop
Expand Down
8 changes: 4 additions & 4 deletions utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ die (const char *format, ...)
}

void
die_unless_label_valid (const char *label)
die_unless_label_valid (UNUSED const char *label)
{
#ifdef HAVE_SELINUX
if (is_selinux_enabled () == 1)
Expand Down Expand Up @@ -854,7 +854,7 @@ pivot_root (const char * new_root, const char * put_old)
}

char *
label_mount (const char *opt, const char *mount_label)
label_mount (const char *opt, UNUSED const char *mount_label)
{
#ifdef HAVE_SELINUX
if (mount_label)
Expand All @@ -871,7 +871,7 @@ label_mount (const char *opt, const char *mount_label)
}

int
label_create_file (const char *file_label)
label_create_file (UNUSED const char *file_label)
{
#ifdef HAVE_SELINUX
if (is_selinux_enabled () > 0 && file_label)
Expand All @@ -881,7 +881,7 @@ label_create_file (const char *file_label)
}

int
label_exec (const char *exec_label)
label_exec (UNUSED const char *exec_label)
{
#ifdef HAVE_SELINUX
if (is_selinux_enabled () > 0 && exec_label)
Expand Down

0 comments on commit b9d0ac3

Please sign in to comment.