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
F151330229: D31948.id.diff
Tue, Apr 7, 3:49 PM
Unknown Object (File)
Mon, Apr 6, 3:19 AM
Unknown Object (File)
Sat, Apr 4, 12:07 AM
Unknown Object (File)
Fri, Apr 3, 2:01 AM
Unknown Object (File)
Sat, Mar 28, 12:53 AM
Unknown Object (File)
Thu, Mar 26, 3:08 PM
Unknown Object (File)
Thu, Mar 19, 11:19 AM
Unknown Object (File)
Feb 8 2026, 10:46 AM
Subscribers

Details

Summary

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

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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