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)
Thu, Mar 7, 11:57 PM
Unknown Object (File)
Sat, Mar 2, 7:42 AM
Unknown Object (File)
Feb 2 2024, 7:58 AM
Unknown Object (File)
Dec 23 2023, 12:43 AM
Unknown Object (File)
Dec 12 2023, 10:40 AM
Unknown Object (File)
Dec 9 2023, 11:21 PM
Unknown Object (File)
Dec 3 2023, 8:35 AM
Unknown Object (File)
Dec 1 2023, 12:38 PM
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