Page MenuHomeFreeBSD

[libcasper] Use null inline functions when casper is disabled
ClosedPublic

Authored by adrian on Oct 13 2020, 6:39 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 29, 12:04 AM
Unknown Object (File)
Fri, Dec 20, 6:52 PM
Unknown Object (File)
Fri, Dec 20, 6:38 PM
Unknown Object (File)
Fri, Dec 20, 1:39 PM
Unknown Object (File)
Oct 30 2024, 12:56 AM
Unknown Object (File)
Oct 4 2024, 9:37 PM
Unknown Object (File)
Sep 29 2024, 8:26 PM
Unknown Object (File)
Sep 29 2024, 8:26 PM
Subscribers

Details

Summary
  • use null functions rather than defines to make sure the compiler doesn't complain about unused function arguments, which gcc-6 on mips32 indeed does!
Test Plan
  • compiled for freebsd wifi mips testing where i actively disable this stuff to save space

Diff Detail

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

Event Timeline

Agree with the change, two small suggestions

lib/libcasper/services/cap_dns/cap_dns.h
47–48

Maybe style disagrees but I'd probably just put these in the #else case below.

81

maybe

static inline struct hostent *
cap_gethostbyname(cap_channel_t *chan __unused, const char *name)
This revision was not accepted when it landed; it landed in state Needs Review.Oct 13 2020, 10:50 PM
This revision was automatically updated to reflect the committed changes.