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)
Mar 12 2024, 3:26 PM
Unknown Object (File)
Dec 20 2023, 4:50 AM
Unknown Object (File)
Jul 19 2023, 2:29 AM
Unknown Object (File)
Jul 13 2023, 6:34 AM
Unknown Object (File)
Jun 25 2023, 8:22 PM
Unknown Object (File)
Apr 26 2023, 3:59 AM
Unknown Object (File)
Apr 8 2023, 10:24 AM
Unknown Object (File)
Dec 27 2022, 1:41 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 Not Applicable
Unit
Tests Not Applicable

Event Timeline

Agree with the change, two small suggestions

lib/libcasper/services/cap_dns/cap_dns.h
47–48 ↗(On Diff #78177)

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

81 ↗(On Diff #78177)

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.