Warning during compilation - variable not initialised
The compiler throws a warning while updating the package.
My install is R 3.6.1 with x86_64-suse-linux-gnu platform (OpenSUSE Leap 15.1). I was installing airGR 1.3.2.42 from Lyon 1 CRAN repository. The compiler is GNU Fortran 7.4.1.
The message is the following :
gfortran -fno-optimize-sibling-calls -fpic -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -c frun_cemaneige.f -o frun_cemaneige.o
frun_cemaneige.f:115:0:
IF (G.LT.Glocalmax.AND.Gratio.EQ.1.) Glocalmax=G !Update in case of potential melt and G lower than Gseuil
Warning: ‘glocalmax’ may be used uninitialized in this function [-Wmaybe-uninitialized]
As far as I can understand the source code in frun_cemaneige.f
, this is unlikely to create a bug, as glocalmax
is initialised and used only when IsHystBool
is set to TRUE
.