Page MenuHomeFreeBSD

mana: Cast an unused value to void to quiet a warning.
ClosedPublic

Authored by jhb on Sep 13 2021, 6:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 24 2024, 5:35 AM
Unknown Object (File)
Sep 24 2024, 12:21 AM
Unknown Object (File)
Sep 17 2024, 9:53 PM
Unknown Object (File)
Sep 12 2024, 6:20 AM
Unknown Object (File)
Sep 9 2024, 5:56 AM
Unknown Object (File)
Sep 6 2024, 2:42 AM
Unknown Object (File)
Sep 5 2024, 7:34 AM
Unknown Object (File)
Sep 3 2024, 2:23 AM
Subscribers

Details

Summary

This appeases a -Wunused-value warning from GCC 9.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 41502
Build 38391: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Sep 13 2021, 6:28 PM

Adding an atomic_inc() wrapper might be a cleaner way of fixing this.

sys/dev/mana/mana_en.c
579

why not just atmoic_inc?

sys/dev/mana/mana_en.c
579

Because we don't have it yet and would need to add a wrapper in the foo.h compat header that defines atomic_inc_return(). I did suggest it as an alternative though if that would be cleaner.

Thanks for fixing this warning.

This revision is now accepted and ready to land.Sep 16 2021, 4:01 AM