[pulseaudio-discuss] [PATCH] caps: Fix warnings.

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Fri Jan 10 02:45:04 PST 2014


On Sat, 2014-01-04 at 13:04 +0100, poljar (Damir Jelić) wrote:
> On Mon, Dec 30, 2013 at 06:57:47PM +0200, Tanu Kaskinen wrote:
> > On Wed, 2013-12-25 at 11:20 +0100, poljar (Damir Jelić) wrote:
> > > Since this commit: 1da34e99b203de14a45c94ec768faf04d41eca5b gcc was
> > > spewing out some warnings:
> > >     ../../src/daemon/caps.c:89:7: warning: "__FreeBSD__" is not defined [-Wundef]
> > >      #elif __FreeBSD__
> > >     ../../src/daemon/caps.c:92:11: warning: missing terminating ' character [enabled by default]
> > >       #error Don't know how to do capabilities on your system.  Please send a patch.
> > > 
> > > This patch fixes these two warnings.
> > > ---
> > >  src/daemon/caps.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/src/daemon/caps.c b/src/daemon/caps.c
> > > index 7fc7357..ea095e8 100644
> > > --- a/src/daemon/caps.c
> > > +++ b/src/daemon/caps.c
> > > @@ -86,10 +86,10 @@ void pa_drop_caps(void) {
> > >      pa_assert_se(cap_clear(caps) == 0);
> > >      pa_assert_se(cap_set_proc(caps) == 0);
> > >      pa_assert_se(cap_free(caps) == 0);
> > > -#elif __FreeBSD__
> > > +#elif defined __FreeBSD__
> > >      pa_assert_se (cap_enter () == 0);
> > >  #else
> > > -#error Don't know how to do capabilities on your system.  Please send a patch.
> > > +#error "Don't know how to do capabilities on your system.  Please send a patch."
> > >  #endif /* __linux */
> > >  #else /* HAVE_SYS_CAPABILITY_H */
> > >      pa_log_warn("Normally all extra capabilities would be dropped now, but "
> > 
> > Sorry, I didn't notice your patch before I made a fix myself today:
> > http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=4c5ec015a4b33015114a66ec2f9c435ba8e41c7d
> > 
> 
> No problem.
> 
> Btw one thing to remember in the future: according to this page [1] the 
> __linux macro is obsolete and only the __linux__ macro should be used.
> 
> [1] http://sourceforge.net/p/predef/wiki/OperatingSystems/

Thanks for the information, fixed now:
http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=25b7b39367a57c1816a76f055c416d81075c591c

-- 
Tanu



More information about the pulseaudio-discuss mailing list