Page MenuHomeFreeBSD

ibcore: Mark write-only variables
ClosedPublic

Authored by andrew on Wed, May 22, 2:35 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jun 12, 4:31 PM
Unknown Object (File)
Sat, Jun 8, 4:21 PM
Unknown Object (File)
Wed, Jun 5, 7:21 AM
Unknown Object (File)
Thu, May 30, 6:26 PM
Unknown Object (File)
Fri, May 24, 6:00 PM
Unknown Object (File)
Wed, May 22, 5:40 PM
Unknown Object (File)
Wed, May 22, 5:08 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 57847
Build 54735: arc lint + arc unit

Event Timeline

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

This revision is now accepted and ready to land.Mon, Jun 3, 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.Tue, Jun 11, 11:16 AM
This revision is now accepted and ready to land.Tue, Jun 11, 2:33 PM
This revision was automatically updated to reflect the committed changes.