Skip to content

Conversation

@tejlmand
Copy link
Contributor

@tejlmand tejlmand commented Apr 10, 2025

See commit messages.

@tejlmand tejlmand requested review from a team as code owners April 10, 2025 07:21
@github-actions github-actions bot added manifest changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. labels Apr 10, 2025
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Apr 10, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
nrfxlib nrfconnect/sdk-nrfxlib@5df35f6 nrfconnect/sdk-nrfxlib@864943e nrfconnect/[email protected]

All manifest checks OK

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@NordicBuilder
Copy link
Contributor

NordicBuilder commented Apr 10, 2025

CI Information

To view the history of this post, clich the 'edited' button above
Build number: 9

Inputs:

Sources:

sdk-nrf: PR head: da9bdcd8aa5c810be13b137c74ea6780a3aa5f84
nrfxlib: PR head: 864943e7301aa90eb684829f10905e910e844f18

more details

sdk-nrf:

PR head: da9bdcd8aa5c810be13b137c74ea6780a3aa5f84
merge base: 432819ccc14501250e2900d89abdfad076627916
target head (main): 432819ccc14501250e2900d89abdfad076627916
Diff

nrfxlib:

PR head: 864943e7301aa90eb684829f10905e910e844f18
merge base: 5df35f66f3c0a63a0b451499ee4466327b707a74
Diff

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (7)
modules
│  ├── openthread
│  │  ├── platform
│  │  │  │ diag.c
nrfxlib
│  ├── nrf_802154
│  │  ├── driver
│  │  │  ├── src
│  │  │  │  ├── mac_features
│  │  │  │  │  │ nrf_802154_delayed_trx.c
subsys
│  ├── net
│  │  ├── openthread
│  │  │  ├── rpc
│  │  │  │  ├── server
│  │  │  │  │  │ ot_rpc_netdiag.c
│  ├── nrf_security
│  │  ├── src
│  │  │  ├── drivers
│  │  │  │  ├── cracen
│  │  │  │  │  ├── cracenpsa
│  │  │  │  │  │  ├── src
│  │  │  │  │  │  │  ├── ecdsa.c
│  │  │  │  │  │  │  ├── kmu.c
│  │  │  │  │  │  │  │ sign.c
west.yml

Outputs:

Toolchain

Version: 7cbc0036f4
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:7cbc0036f4_8bf7ca4353

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister
    • sdk-nrf test count: 1776
  • ❌ Integration tests
    • ✅ test-fw-nrfconnect-boot
    • ✅ test_ble_nrf_config
    • ❌ test-fw-nrfconnect-chip
    • ✅ test-fw-nrfconnect-nrf-iot_cloud
    • ✅ test-fw-nrfconnect-nrf_crypto
    • ✅ test-fw-nrfconnect-rs
    • ✅ test-fw-nrfconnect-fem
    • ✅ test-fw-nrfconnect-tfm
    • ✅ test-fw-nrfconnect-thread
    • ✅ test-sdk-find-my
    • ✅ test-sdk-mcuboot
    • ✅ test-sdk-dfu
    • ❌ test-fw-nrfconnect-ps
Disabled integration tests
    • desktop52_verification
    • doc-internal
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-ble_mesh
    • test-fw-nrfconnect-ble_samples
    • test-fw-nrfconnect-nfc
    • test-fw-nrfconnect-nrf-iot_libmodem-nrf
    • test-fw-nrfconnect-nrf-iot_mosh
    • test-fw-nrfconnect-nrf-iot_positioning
    • test-fw-nrfconnect-nrf-iot_samples
    • test-fw-nrfconnect-nrf-iot_serial_lte_modem
    • test-fw-nrfconnect-nrf-iot_thingy91
    • test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • test-fw-nrfconnect-proprietary_esb
    • test-fw-nrfconnect-rpc
    • test-low-level
    • test-sdk-audio
    • test-sdk-pmic-samples
    • test-sdk-wifi
    • test-secdom-samples-public

Note: This message is automatically posted and updated by the CI

@tejlmand tejlmand force-pushed the clang_warning_fixes branch from bb579bf to c0d4c00 Compare April 10, 2025 07:30
@github-actions
Copy link

You can find the documentation preview for this PR here.

@nordicjm
Copy link
Contributor

Note: will need manual backporting to v3.0-branch because of manifest update

@carlescufi carlescufi changed the title cracen: moving declaration of variable to top of function clang: Fix multiple warnings Apr 10, 2025
@tejlmand tejlmand force-pushed the clang_warning_fixes branch from 4f6974d to be69e46 Compare April 10, 2025 09:57
@tejlmand tejlmand requested a review from a team as a code owner April 10, 2025 09:57
@tejlmand tejlmand force-pushed the clang_warning_fixes branch from be69e46 to a7f45a2 Compare April 10, 2025 10:19
@NordicBuilder NordicBuilder removed the DNM label Apr 10, 2025
Copy link
Contributor

@Damian-Nordic Damian-Nordic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approving RPC server bits

tejlmand and others added 5 commits April 10, 2025 17:14
Declaration of variables after a label inside a switch statement is a
c23 extension, not c99.

This results in the following warning when compiling with clang:
> ..subsys/nrf_security/src/drivers/cracen/cracenpsa/src/ecdsa.c:407:3:
>    warning: label followed by a declaration is a C23 extension
>  407 |          size_t copylen = MIN(digestsz, opsz - hmac_op->tlen);
>      |          ^
> 1 warning generated.

There is no practical reason why the variable should be declared
inside the switch statement, therefore move the declaration and place it
together with declaration of other variables.

Signed-off-by: Torsten Rasmussen <[email protected]>
Update Zephyr, mcuboot, and nrfxlib repositories to fix compilation
warnings discovered by clang.

Signed-off-by: Torsten Rasmussen <[email protected]>
Safeguard `cracen_signature_set_hashalgo_from_digestsz()`
and `cracen_signature_set_hashalgo()` inside `PSA_MAX_RSA_KEY_BITS > 0`.

Safeguard `can_sign()` inside
> CONFIG_PSA_WANT_ALG_PURE_EDDSA || `CONFIG_PSA_WANT_ALG_ED25519PH ||
> CONFIG_PSA_WANT_ALG_ECDSA || CONFIG_PSA_WANT_ALG_HMAC

All calls to `cracen_signature_set_hashalgo()` and
`cracen_signature_set_hashalgo_from_digestsz()` are safeguarded in
`PSA_MAX_RSA_KEY_BITS > 0` resulting in unused function warning because
those static functions will never be used when the condition is not met.

Similar for calls to `can_sign()`.
Fixes:
> ...subsys/nrf_security/src/drivers/cracen/cracenpsa/src/sign.c:41:12:
>      warning: unused function
>      'cracen_signature_set_hashalgo' [-Wunused-function]
>    41 | static int cracen_signature_set_hashalgo(...
>       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 1 warning generated.

> ...subsys/nrf_security/src/drivers/cracen/cracenpsa/src/sign.c:46:12:
>      warning: unused function
>      'cracen_signature_set_hashalgo_from_digestsz' [-Wunused-function]
>    46 | static int cracen_signature_set_hashalgo_from_digestsz(...
>       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 1 warning generated.

> ...subsys/nrf_security/src/drivers/cracen/cracenpsa/src/kmu.c:297:13:
>      warning: unused function 'can_sign' [-Wunused-function]
>   297 | static bool can_sign(const psa_key_attributes_t *key_attr)
>       |             ^~~~~~~~
> 1 warning generated.

Signed-off-by: Torsten Rasmussen <[email protected]>
Verify return values for otPlatRadio* functions and log the error
accordingly. For otPlatRadioTransmit() case, just log the error
and let the entire TX procedure proceed on the next timeout.

Signed-off-by: Robert Lubos <[email protected]>
Declaration of variables after a label inside a switch statement is a
c23 extension, not c99.

This results in the following warning when compiling with clang:
> .../subsys/net/openthread/rpc/server/ot_rpc_netdiag.c:86:3: warning:
>  label followed by a declaration is a C23 extension [-Wc23-extensions]
>    86 |                 uint8_t mode = 0;
>       |                 ^
> 1 warning generated.

There are no practical reasons why the variable should be declared
inside the switch statement, therefore move the declaration to top of
function.

Signed-off-by: Torsten Rasmussen <[email protected]>
@carlescufi carlescufi force-pushed the clang_warning_fixes branch from a7f45a2 to da9bdcd Compare April 10, 2025 15:16
@carlescufi carlescufi merged commit c4fbab0 into nrfconnect:main Apr 10, 2025
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport v3.0-branch changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. manifest manifest-mcuboot manifest-nrfxlib manifest-zephyr

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants