Skip to content

Commit

Permalink
apparmor: resolve uninitialized symbol warnings in policy_unpack_test.c
Browse files Browse the repository at this point in the history
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Mike Salvatore <[email protected]>
Signed-off-by: John Johansen <[email protected]>
  • Loading branch information
mssalvatore authored and John Johansen committed Jul 9, 2022
1 parent 7b4bd12 commit ba77f39
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions security/apparmor/policy_unpack_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ struct policy_unpack_fixture {
size_t e_size;
};

struct aa_ext *build_aa_ext_struct(struct policy_unpack_fixture *puf,
struct kunit *test, size_t buf_size)
static struct aa_ext *build_aa_ext_struct(struct policy_unpack_fixture *puf,
struct kunit *test, size_t buf_size)
{
char *buf;
struct aa_ext *e;
Expand Down Expand Up @@ -439,7 +439,7 @@ static void policy_unpack_test_unpack_u32_with_null_name(struct kunit *test)
{
struct policy_unpack_fixture *puf = test->priv;
bool success;
u32 data;
u32 data = 0;

puf->e->pos += TEST_U32_BUF_OFFSET;

Expand All @@ -456,7 +456,7 @@ static void policy_unpack_test_unpack_u32_with_name(struct kunit *test)
struct policy_unpack_fixture *puf = test->priv;
const char name[] = TEST_U32_NAME;
bool success;
u32 data;
u32 data = 0;

puf->e->pos += TEST_NAMED_U32_BUF_OFFSET;

Expand All @@ -473,7 +473,7 @@ static void policy_unpack_test_unpack_u32_out_of_bounds(struct kunit *test)
struct policy_unpack_fixture *puf = test->priv;
const char name[] = TEST_U32_NAME;
bool success;
u32 data;
u32 data = 0;

puf->e->pos += TEST_NAMED_U32_BUF_OFFSET;
puf->e->end = puf->e->start + TEST_U32_BUF_OFFSET + sizeof(u32);
Expand All @@ -489,7 +489,7 @@ static void policy_unpack_test_unpack_u64_with_null_name(struct kunit *test)
{
struct policy_unpack_fixture *puf = test->priv;
bool success;
u64 data;
u64 data = 0;

puf->e->pos += TEST_U64_BUF_OFFSET;

Expand All @@ -506,7 +506,7 @@ static void policy_unpack_test_unpack_u64_with_name(struct kunit *test)
struct policy_unpack_fixture *puf = test->priv;
const char name[] = TEST_U64_NAME;
bool success;
u64 data;
u64 data = 0;

puf->e->pos += TEST_NAMED_U64_BUF_OFFSET;

Expand All @@ -523,7 +523,7 @@ static void policy_unpack_test_unpack_u64_out_of_bounds(struct kunit *test)
struct policy_unpack_fixture *puf = test->priv;
const char name[] = TEST_U64_NAME;
bool success;
u64 data;
u64 data = 0;

puf->e->pos += TEST_NAMED_U64_BUF_OFFSET;
puf->e->end = puf->e->start + TEST_U64_BUF_OFFSET + sizeof(u64);
Expand Down

0 comments on commit ba77f39

Please sign in to comment.