Skip to content

Commit fb722f5

Browse files
jaccoo01adeaarm
authored andcommitted
CC3XX: Tests: Fix errors when compiling with GCC14
GCC14 has upgraded some warnings to errors and therefore we need to fix them in order to compile the tests. These are the following: - -Wimplicit-function-declaration. Note that in pka_test_virtual_registers we need to update the function call as the arguments passed are incorrect - -Wreturn-mismatch Change-Id: Icea54ceefd9265812e0bdbdb3b97af29d080ca20 Signed-off-by: Jackson Cooper-Driver <[email protected]>
1 parent a68b811 commit fb722f5

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed

platform/ext/target/arm/drivers/cc3xx/tests/src/cc3xx_test_dpa.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
/*
2-
* Copyright (c) 2025, Arm Limited. All rights reserved.
2+
* SPDX-FileCopyrightText: Copyright The TrustedFirmware-M Contributors
33
*
44
* SPDX-License-Identifier: BSD-3-Clause
55
*
66
*/
77

8+
#include <string.h>
9+
810
#include "cc3xx_test_dpa.h"
911
#ifndef CC3XX_CONFIG_FILE
1012
#include "cc3xx_config.h"

platform/ext/target/arm/drivers/cc3xx/tests/src/cc3xx_test_ecc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
/*
2-
* Copyright (c) 2023, Arm Limited. All rights reserved.
2+
* SPDX-FileCopyrightText: Copyright The TrustedFirmware-M Contributors
33
*
44
* SPDX-License-Identifier: BSD-3-Clause
55
*
66
*/
77

8+
#include <string.h>
89

910
#include "cc3xx_test_ecc.h"
1011
#include "cc3xx_ec.h"

platform/ext/target/arm/drivers/cc3xx/tests/src/cc3xx_test_ecdsa.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023-2025, Arm Limited. All rights reserved.
2+
* SPDX-FileCopyrightText: Copyright The TrustedFirmware-M Contributors
33
*
44
* SPDX-License-Identifier: BSD-3-Clause
55
*
@@ -3623,7 +3623,7 @@ static void ecdsa_getpub_tests(struct test_result_t *ret)
36233623
for (size_t i = 0; i < ARRAY_SIZE(curve_id); i++) {
36243624

36253625
if (curve_id_to_name(curve_id[i], &curve_name)) {
3626-
return 1;
3626+
return;
36273627
}
36283628

36293629
const cc3xx_ec_curve_data_t *curve_data = cc3xx_lowlevel_ec_get_curve_data(curve_id[i]);

platform/ext/target/arm/drivers/cc3xx/tests/src/cc3xx_test_pka.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
/*
2-
* Copyright (c) 2023, Arm Limited. All rights reserved.
2+
* SPDX-FileCopyrightText: Copyright The TrustedFirmware-M Contributors
33
*
44
* SPDX-License-Identifier: BSD-3-Clause
55
*
66
*/
77

8+
#include <string.h>
9+
810
#include "cc3xx_test_pka.h"
911
#ifndef CC3XX_CONFIG_FILE
1012
#include "cc3xx_config.h"
@@ -13,6 +15,7 @@
1315
#endif
1416
#include "cc3xx_test_assert.h"
1517
#include "cc3xx_dev.h"
18+
#include "cc3xx_rng.h"
1619

1720
#include "cc3xx_test_utils.h"
1821

@@ -863,8 +866,8 @@ void pka_test_virtual_registers(struct test_result_t *ret)
863866
}
864867

865868
for (idx = 0; idx < 128; idx++) {
866-
cc3xx_lowlevel_rng_get_random_uint(sizeof(r), &rand_0);
867-
cc3xx_lowlevel_rng_get_random_uint(sizeof(r), &rand_1);
869+
cc3xx_lowlevel_rng_get_random_uint(sizeof(r), &rand_0, CC3XX_RNG_FAST);
870+
cc3xx_lowlevel_rng_get_random_uint(sizeof(r), &rand_1, CC3XX_RNG_FAST);
868871

869872
cc3xx_lowlevel_pka_add(r[rand_0], r[rand_1], res);
870873
cc3xx_lowlevel_pka_read_reg(res, &readback, sizeof(readback));

platform/ext/target/arm/drivers/cc3xx/tests/src/cc3xx_test_utils.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2024, Arm Limited. All rights reserved.
2+
* SPDX-FileCopyrightText: Copyright The TrustedFirmware-M Contributors
33
*
44
* SPDX-License-Identifier: BSD-3-Clause
55
*
@@ -8,6 +8,7 @@
88

99
#include "cc3xx_test_utils.h"
1010

11+
#include <string.h>
1112
#include <assert.h>
1213

1314
void cc3xx_add_tests_to_testsuite(struct test_t *test_list, uint32_t test_am,

0 commit comments

Comments
 (0)