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)
Fri, Jul 17, 4:48 PM
Unknown Object (File)
Thu, Jul 9, 8:32 AM
Unknown Object (File)
Jun 18 2026, 1:27 PM
Unknown Object (File)
Jun 17 2026, 1:38 AM
Unknown Object (File)
May 12 2026, 2:21 PM
Unknown Object (File)
May 10 2026, 7:43 AM
Unknown Object (File)
May 8 2026, 7:58 PM
Unknown Object (File)
May 7 2026, 3:57 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.