Skip to content

Conversation

titouanc
Copy link
Contributor

@titouanc titouanc commented Oct 8, 2025

This fixes an annoying compilation error that affects all ongoing PR since the Network MIDI 2.0 PR was merged this morning (cc @butok)

Passing a USB-MIDI device in a ump stream responder configuration,
as obtained from the device tree with DEVICE_DT_GET(), was wrongly
casting is from const struct device* to void*, hence removing the const
pointer attribute.

This incorrectness introduces some compilation issue. Let's therefore
make the device pointer constant in ump_stream_responder_cfg, and
add a macro to make the proper typecast consistently. Finally, adapt the
corresponding samples to use that new macro.

Signed-off-by: Titouan Christophe <[email protected]>
This fixes the following compilation warning:

    format '%X' expects argument of type 'unsigned int',
    but argument 2 has type 'long unsigned int'

Signed-off-by: Titouan Christophe <[email protected]>
Copy link

sonarqubecloud bot commented Oct 8, 2025

@kartben kartben added the Hotfix Fix for issues blocking development, i.e. CI issues, tests failing in CI, etc. label Oct 8, 2025
@cfriedt cfriedt merged commit dba0a28 into zephyrproject-rtos:main Oct 8, 2025
37 checks passed
@butok
Copy link
Contributor

butok commented Oct 9, 2025

Hi @titouanc
After this hotfix PR, the CI still reports an error.
So the issue is not fully solved.
Try west build -p -b frdm_mcxa156/mcxa156 samples/subsys/usb/midi -T sample.usb_device_next.midi:
/zephyr/subsys/usb/device_next/class/usbd_midi2.c:472:17: warning: format '%X' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int'

@miggazElquez
Copy link
Contributor

There is #97251 that fix this warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Networking area: Samples Samples area: USB Universal Serial Bus Hotfix Fix for issues blocking development, i.e. CI issues, tests failing in CI, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants