On Wed, Apr 17, 2019 at 04:58:38PM +0000, Adrian Chadd wrote: > Author: adrian > Date: Wed Apr 17 16:58:38 2019 > New Revision: 346322 > URL: https://svnweb.freebsd.org/changeset/base/346322 > > Log: > [casper] fix compilation when casper is disabled. > > This triggers an error in gcc-mips 6.4.0 complaining about unused arguments. > > Tested: > > * compiled/run on mips32; nothing complained. > > Modified: > head/lib/libcasper/services/cap_fileargs/cap_fileargs.h > > Modified: head/lib/libcasper/services/cap_fileargs/cap_fileargs.h > ============================================================================== > --- head/lib/libcasper/services/cap_fileargs/cap_fileargs.h Wed Apr 17 > 16:45:42 2019 (r346321) > +++ head/lib/libcasper/services/cap_fileargs/cap_fileargs.h Wed Apr 17 > 16:58:38 2019 (r346322) > @@ -108,8 +108,12 @@ fileargs_cinitnv(cap_channel_t *cas __unused, nvlist_t > lstat(name, sb) > #define fileargs_open(fa, name) > \ > open(name, fa->fa_flags, fa->fa_mode) > -#define fileargs_fopen(fa, name, mode) > \ > - fopen(name, mode) > +static inline > +FILE *fileargs_fopen(fileargs_t *fa, const char *name, const char *mode) > +{ > + (void) fa; __unused is not good enough? > + return (fopen(name, mode)); > +} > #define fileargs_free(fa) (free(fa)) > #endif > >
-- Mariusz Zaborski oshogbo//vx | http://oshogbo.vexillium.org FreeBSD committer | https://freebsd.org Software developer | http://wheelsystems.com If it's not broken, let's fix it till it is!!1
signature.asc
Description: PGP signature