Page MenuHomeFreeBSD

tcp_lro_log: mark __unused to avoid unused function warning
AbandonedPublic

Authored by rlibby on Feb 17 2021, 11:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 19, 6:28 PM
Unknown Object (File)
Apr 14 2024, 2:16 AM
Unknown Object (File)
Feb 21 2024, 1:52 PM
Unknown Object (File)
Dec 20 2023, 7:10 AM
Unknown Object (File)
Dec 14 2023, 12:23 AM
Unknown Object (File)
Dec 12 2023, 10:03 AM
Unknown Object (File)
May 17 2023, 9:10 AM
Unknown Object (File)
May 4 2023, 10:32 PM

Details

Reviewers
rrs
Group Reviewers
transport
Summary

After ab4fad4be14462e347ed24ee3663a18eacfb138e tcp_lro_log became only
used if TCPHPTS was defined. Annotate it with __unused to suppress a
warning from gcc.

Test Plan
env MAKEOBJDIRPREFIX=/usr/obj/gcc9 CROSS_TOOLCHAIN=amd64-gcc9 make buildkernel

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 37141
Build 34030: arc lint + arc unit

Event Timeline

question

If we put the wrap
#ifdef TCPHPTS

#endif

Around the function do we still need __unused for gcc?

(it won't be unused of course if TCPHPTS is defined)

In D28761#644041, @rrs wrote:

question

If we put the wrap
#ifdef TCPHPTS

#endif

Around the function do we still need __unused for gcc?

(it won't be unused of course if TCPHPTS is defined)

Right, that would work too. Is that your preference?

My thought was that it wasn't clear to me that tcp_lro_log was really related to TCPHPTS. If other tcp_lro code wanted to call it, would it then have to change the ifdef? But I will defer to your judgement there.

I prefer the traditional approach taken in D28759.