[nas] [PATCH] Fix warnings about 'free' in nasd on GNU/Linux x86
Erik Auerswald
auerswal at unix-ag.uni-kl.de
Fri Aug 16 07:48:49 MDT 2013
Hello Marcos,
thanks for your review!
On Fri, Aug 16, 2013 at 03:25:49PM +0200, Marcos Mayorga wrote:
> what does xfree that doesn't do free? is it NAS a component that require X?
xfree() is a wrapper around free() that checks for a NULL pointer first.
This is not needed on GNU/Linux.
> 2013/8/16 Erik Auerswald <auerswal at unix-ag.uni-kl.de>
> >
> > the attached patch fixes the following warnings about 'free' when
> > compiling NAS on GNU/Linux x86 (32 bit):
> >
> > ---8<---
> > uevents.c: In function ‘ProcessAudioEvents’:
> > auevents.c:149: warning: incompatible implicit declaration of built-in
> > function ‘free’
> > auevents.c: In function ‘AuDequeueEvents’:
> > auevents.c:249: warning: incompatible implicit declaration of built-in
> > function ‘free’
> > connection.c: In function ‘open_unix_socket’:
> > connection.c:585: warning: incompatible implicit declaration of built-in
> > function ‘free’
> > connection.c:608: warning: incompatible implicit declaration of built-in
> > function ‘free’
> > ---8<---
In these files, the xfree symbol is defined, but the free symbol is
not. Adding an #include <stdlib.h> resulted in a compile error, thus
the use of xfree.
Thanks,
Erik
--
On the internet, nobody can hear you being subtle.
-- Linus Torvalds
More information about the nas
mailing list