Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: utils: Fix unused function warning #85430

Merged
merged 1 commit into from
Feb 9, 2025

Conversation

thughes
Copy link
Contributor

@thughes thughes commented Feb 7, 2025

Building with clang warns:

subsys/net/ip/utils.c:600:24: error: unused function 'pkt_calc_chksum'
[-Werror,-Wunused-function]
static inline uint16_t pkt_calc_chksum(struct net_pkt *pkt, uint16_t sum)
^

pkt_calc_chksum is called by net_calc_chksum, which only exists when
CONFIG_NET_NATIVE_IP is defined.

Building with clang warns:

subsys/net/ip/utils.c:600:24: error: unused function 'pkt_calc_chksum'
[-Werror,-Wunused-function]
static inline uint16_t pkt_calc_chksum(struct net_pkt *pkt, uint16_t sum)
                       ^

pkt_calc_chksum is called by net_calc_chksum, which only exists when
CONFIG_NET_NATIVE_IP is defined.

Signed-off-by: Tom Hughes <[email protected]>
@thughes thughes marked this pull request as ready for review February 8, 2025 05:27
@zephyrbot zephyrbot added size: XS A PR changing only a single line of code area: Networking labels Feb 8, 2025
@kartben kartben added the Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. label Feb 8, 2025
@nashif nashif merged commit 67e07b7 into zephyrproject-rtos:main Feb 9, 2025
33 checks passed
@thughes thughes deleted the push-oxzssqqptmnr branch February 10, 2025 17:26
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.

7 participants