[asterisk-r2] src/queue.c compile error

Gergely Lónyai aleph at mandriva.org
Sun Jun 5 23:43:33 CDT 2011



> -------- Original Message --------
> Subject: Re: [asterisk-r2] src/queue.c compile error
> From: Moises Silva <moises.silva at gmail.com>
> Date: Mon, June 06, 2011 12:47 am
> To: asterisk-r2 at lists.digium.com
> 
> 
> 2011/6/5 Gergely Lónyai <aleph at mandriva.org>
> 
> > Hi
> >
> > The openr2 doesn't compile by gcc-4.6 (unused variable problem). I apply
> > the attached patch and now compile.
> >
> 
> Hello Aleph,
> 
> Thanks for the heads up. However the patch is no good. Instead of fixing the
> problem is masking it. Besides, Makefile.in is an auto-generated file, which
> should not be patched. The proper way to fix it is in the C code.
> 
> Could you paste here the compiler error?
> 

Hi

I didn't like to resolve the problem only compile the program...
The problem is here:

 gcc -DHAVE_CONFIG_H -I. -I. -I.. -std=c99 -pedantic -Wall -Werror
-Wwrite-strings -Wunused-variable -Wstrict-prototypes
-Wmissing-prototypes -DREVISION=\"exported\" -D__OR2_COMPILING_LIBRARY__
-fvisibility=hidden -ggdb3 -O0 -MT libopenr2_la-queue.lo -MD -MP -MF
.deps/libopenr2_la-queue.Tpo -c queue.c  -fPIC -DPIC -o
.libs/libopenr2_la-queue.o
if gcc -DHAVE_CONFIG_H -I. -I. -I..    -std=c99 -pedantic -Wall -Werror
-Wwrite-strings -Wunused-variable -Wstrict-prototypes
-Wmissing-prototypes  -DREVISION=\"exported\" -ggdb3 -O0 -MT
r2dtmf_detect-r2dtmf_detect.o -MD -MP -MF
".deps/r2dtmf_detect-r2dtmf_detect.Tpo" -c -o
r2dtmf_detect-r2dtmf_detect.o `test -f 'r2dtmf_detect.c' || echo
'./'`r2dtmf_detect.c; \
then mv -f ".deps/r2dtmf_detect-r2dtmf_detect.Tpo"
".deps/r2dtmf_detect-r2dtmf_detect.Po"; else rm -f
".deps/r2dtmf_detect-r2dtmf_detect.Tpo"; exit 1; fi
queue.c: In function 'queue_read_byte':
queue.c:185:9: error: variable 'to_end' set but not used
[-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors

Aleph




More information about the asterisk-r2 mailing list