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)
Sat, Sep 21, 2:30 AM
Unknown Object (File)
Mon, Sep 16, 12:45 PM
Unknown Object (File)
Aug 16 2024, 7:57 AM
Unknown Object (File)
Jul 19 2024, 1:37 PM
Unknown Object (File)
Jul 15 2024, 6:05 AM
Unknown Object (File)
Jul 10 2024, 11:01 AM
Unknown Object (File)
May 19 2024, 6:28 PM
Unknown Object (File)
Apr 14 2024, 2:16 AM

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.