Page MenuHomeFreeBSD

ibcore: Mark write-only variables
ClosedPublic

Authored by andrew on May 22 2024, 2:35 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 27, 3:14 PM
Unknown Object (File)
Sat, Oct 26, 1:11 PM
Unknown Object (File)
Sep 30 2024, 11:32 PM
Unknown Object (File)
Sep 30 2024, 7:12 AM
Unknown Object (File)
Sep 24 2024, 12:45 AM
Unknown Object (File)
Sep 22 2024, 6:09 PM
Unknown Object (File)
Sep 13 2024, 5:59 PM
Unknown Object (File)
Sep 8 2024, 3:32 PM
Subscribers

Details

Summary

Some LinuxKPI lock macros pass need a flags field passed in. This is
written to but never read from so gcc complains.

Fix this by marking the flags variables as unused to quieten the
compiler.

Sponsored by: Arm Ltd

Diff Detail

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

Event Timeline

I wonder if we want a local #define __writeonly __unused for documentation purposes.

This revision is now accepted and ready to land.Jun 3 2024, 5:34 PM

I wonder if we want a local #define __writeonly __unused for documentation purposes.

If we do, maybe that's best in sys/cdefs.h instead of here?

May be instead, the *lock_irq* macros might do something to fake the argument use?

This revision now requires review to proceed.Jun 11 2024, 11:16 AM
This revision is now accepted and ready to land.Jun 11 2024, 2:33 PM
This revision was automatically updated to reflect the committed changes.