Page MenuHomeFreeBSD

fix "set but not used" in the tws driver
ClosedPublic

Authored by rew on Jan 7 2022, 7:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 7, 7:12 PM
Unknown Object (File)
Sat, Sep 20, 7:05 PM
Unknown Object (File)
Sep 10 2025, 4:49 AM
Unknown Object (File)
Aug 27 2025, 11:30 AM
Unknown Object (File)
Aug 13 2025, 12:33 PM
Unknown Object (File)
Jun 24 2025, 3:59 AM
Unknown Object (File)
Jun 23 2025, 6:03 AM
Unknown Object (File)
Jun 23 2025, 5:00 AM
Subscribers

Details

Summary

With __diagused, these warnings were still emitted since INVARIANTS is
defined but TWS_DEBUG is not.

Not sure if it's better to go with __tws_debug or something like:

#ifdef TWS_DEBUG
        u_int32_t reg;
#endif

Diff Detail

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

Event Timeline

rew requested review of this revision.Jan 7 2022, 7:34 PM

__tws_debug is a little shorter, but it's also a bit odd... Since you already have the right place to drop it into tws_services.h, thats likely pushes things in favor of that instead of #ifdef TWS_DEBUG or similar.

This revision was not accepted when it landed; it landed in state Needs Review.Jan 9 2022, 11:32 PM
This revision was automatically updated to reflect the committed changes.