Skip to content

Conversation

aescolar
Copy link
Member

@aescolar aescolar commented Oct 21, 2025

Explicitly cast down the string width to int, as otherwise it is size_t which may have a bigger size.

Avoids the following build error when building with native_sim//64 (longs are 64, ints 32):

subsys/net/lib/shell/dns.c:496:67: error: field precision specifier ‘.*’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ {aka ‘long unsigned int’}

Code introduced in 7158f33

Explicitly cast down the string width to int, as otherwise it is
size_t which may have a bigger size.

Avoids the following build error:

subsys/net/lib/shell/dns.c:496:67: error: field precision specifier
‘.*’ expects argument of type ‘int’, but argument 4 has type ‘size_t’
{aka ‘long unsigned int’}

Signed-off-by: Alberto Escolar Piedras <[email protected]>
@aescolar
Copy link
Member Author

CC @ckhardin

@aescolar aescolar requested review from jukkar and rlubos October 21, 2025 10:34
@aescolar aescolar added the Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. label Oct 21, 2025
@aescolar aescolar marked this pull request as ready for review October 21, 2025 10:43
@zephyrbot zephyrbot added area: Networking size: XS A PR changing only a single line of code labels Oct 21, 2025
@zephyrbot zephyrbot requested review from pdgendt and ssharks October 21, 2025 10:45
@sonarqubecloud
Copy link

@cfriedt cfriedt merged commit 499aa99 into zephyrproject-rtos:main Oct 21, 2025
39 checks passed
@aescolar aescolar deleted the dns_case_fix branch October 22, 2025 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Networking size: XS A PR changing only a single line of code Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants