Skip to content

Commit

Permalink
Merge pull request #10837 from bboozzoo/bboozzoo/clang-13-happy-again
Browse files Browse the repository at this point in the history
cmd/libsnap-confine-private: fix set but unused variable in the unit tests
  • Loading branch information
mvo5 authored Sep 24, 2021
2 parents 2629979 + df22f37 commit f2cacda
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/libsnap-confine-private/cgroup-support-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,10 @@ static void test_sc_cgroupv2_own_group_path_empty(cgroupv2_own_group_fixture *fi

static void _test_sc_cgroupv2_own_group_path_die_with_message(const char *msg) {
if (g_test_subprocess()) {
char *p SC_CLEANUP(sc_cleanup_string) = NULL;
// keep this separate so that p isn't unused
char *p = NULL;
p = sc_cgroup_v2_own_path_full();
/* not reached */
sc_cleanup_string(&p);
}
g_test_trap_subprocess(NULL, 0, 0);
g_test_trap_assert_failed();
Expand Down

0 comments on commit f2cacda

Please sign in to comment.