Skip to content

Commit

Permalink
scmi_power_capping: Fix unit tests
Browse files Browse the repository at this point in the history
To avoid compiler warnings, initialize some unit-test variables

Signed-off-by: Tarek El-Sherbiny <[email protected]>
Change-Id: I038bcf4c82f37729de78ddedbca3ad59275f36f4
  • Loading branch information
tarek-arm authored and leandro-arm committed Jan 25, 2024
1 parent bb29403 commit 70401a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Arm SCP/MCP Software
* Copyright (c) 2023, Arm Limited and Contributors. All rights reserved.
* Copyright (c) 2023-2024, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
Expand Down Expand Up @@ -50,10 +50,10 @@ void utest_scmi_power_capping_init_success(void)
struct mod_scmi_power_capping_domain_context *domain_table =
(struct mod_scmi_power_capping_domain_context *)__LINE__;

struct mod_scmi_power_capping_context expected_ctx = {
.power_capping_domain_ctx_table = domain_table,
.domain_count = domain_count,
};
struct mod_scmi_power_capping_context expected_ctx = { 0 };

expected_ctx.power_capping_domain_ctx_table = domain_table,
expected_ctx.domain_count = domain_count,

fwk_mm_calloc_ExpectAndReturn(
domain_count,
Expand Down Expand Up @@ -209,7 +209,7 @@ void utest_scmi_power_capping_process_notification(void)
{
int status;

struct fwk_event notification_event;
struct fwk_event notification_event = { 0 };

#ifdef BUILD_HAS_SCMI_POWER_CAPPING_STD_COMMANDS
pcapping_protocol_process_notification_ExpectAndReturn(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Arm SCP/MCP Software
* Copyright (c) 2023, Arm Limited and Contributors. All rights reserved.
* Copyright (c) 2023-2024, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
Expand Down Expand Up @@ -380,7 +380,7 @@ void utest_pcapping_fast_channel_bind(void)

void utest_pcapping_fast_channel_set_handler(void)
{
const struct mod_scmi_power_capping_power_apis power_management_api;
const struct mod_scmi_power_capping_power_apis power_management_api = { 0 };

pcapping_fast_channel_set_power_apis(&power_management_api);
TEST_ASSERT_EQUAL(
Expand Down

0 comments on commit 70401a1

Please sign in to comment.