On 01/04/2012 05:06 PM, Mark Leeds wrote:
> thanks tom: I've just been letting the error happen and everything seems
> fine. When you have a chance, could you explain what you'd like me to do
> ? I'd love to look into
> it further but I'm not sure what you mean by your last statement. thanks.
> 

Look at the gcc invocation lines and the warnings:

gcc -m32 -std=gnu99 -I/usr/include/R  -I/usr/local/include    -fpic  -O2 -g
-pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4  -m32 -march=i686 -mtune=atom
-fasynchronous-unwind-tables -c ar1_functions.c -o ar1_functions.o
ar1_functions.c: In function ‘calc_ar1_hessian’:
ar1_functions.c:261:10: warning: variable ‘phigrad’ set but not used
[-Wunused-but-set-variable]
ar1_functions.c:260:10: warning: variable ‘alphagrad’ set but not used
[-Wunused-but-set-variable]
ar1_functions.c:259:10: warning: variable ‘betagrad’ set but not used
[-Wunused-but-set-variable]
ar1_functions.c:258:10: warning: variable ‘rhograd’ set but not used
[-Wunused-but-set-variable]
gcc -m32 -std=gnu99 -I/usr/include/R  -I/usr/local/include    -fpic  -O2 -g
-pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4  -m32 -march=i686 -mtune=atom
-fasynchronous-unwind-tables -c ma1_functions.c -o ma1_functions.o
ma1_functions.c: In function ‘calc_ma1_hessian’:
ma1_functions.c:246:10: warning: variable ‘alphagrad’ set but not used
[-Wunused-but-set-variable]
ma1_functions.c:245:10: warning: variable ‘betagrad’ set but not used
[-Wunused-but-set-variable]
ma1_functions.c:244:10: warning: variable ‘rhograd’ set but not used
[-Wunused-but-set-variable]

The warnings are output in the syntax:

sourcefile:line_number:row_number: warning: description of warning

So, for the first warning:

ar1_functions.c: In function ‘calc_ar1_hessian’:
ar1_functions.c:261:10: warning: variable ‘phigrad’ set but not used
[-Wunused-but-set-variable]

Look inside arl_functions.c, line 261, row 10. It should be a definition
or assignment of "phigrad". If you look throughout the rest of
calc_arl_hessian, you may discover that "phigrad" is not being used in
some workflows. This is what gcc is telling you. Now, if you don't need
phigrad, this is harmless, but in that case, why assign a value to it?
In most cases, this check finds errors in code where you actually do
want to use phigrad.

Hope that helps,

~tom

==
Fedora Project

_______________________________________________
R-SIG-Fedora mailing list
R-SIG-Fedora@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-fedora

Reply via email to