Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uninitialized variables #76

Open
wistaria opened this issue Sep 7, 2019 · 0 comments
Open

uninitialized variables #76

wistaria opened this issue Sep 7, 2019 · 0 comments

Comments

@wistaria
Copy link
Contributor

wistaria commented Sep 7, 2019

version 3.3.0 でかなり怪しそうな warning が出ます。確認お願いします。

/home/vagrant/build/hphi_3.3.0/src/StdFace/StdFace_main.c: In function ‘PrintCalcMod’:
/home/vagrant/build/hphi_3.3.0/src/StdFace/StdFace_main.c:113:6: warning: ‘iCalcType’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   if (iCalcType != 4) StdI->PumpBody = 0;
      ^
/home/vagrant/build/hphi_3.3.0/src/StdFace/StdFace_main.c: In function ‘StdFace_main’:
/home/vagrant/build/hphi_3.3.0/src/StdFace/StdFace_main.c:1664:5: warning: ‘greenindx’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     free(greenindx);
     ^~~~~~~~~~~~~~~
/home/vagrant/build/hphi_3.3.0/src/StdFace/StdFace_main.c:1508:9: note: ‘greenindx’ was declared here
   int **greenindx;
         ^~~~~~~~~
/home/vagrant/build/hphi_3.3.0/src/StdFace/StdFace_main.c:1391:9: warning: ‘greenindx’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   int **greenindx;
         ^~~~~~~~~
/home/vagrant/build/hphi_3.3.0/src/StdFace/StdFace_main.c:276:7: warning: ‘NumOp’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   int NumOp, **spin, isite, ispin, icell, itau;
       ^~~~~
[ 88%] Building C object src/CMakeFiles/HPhi.dir/StdFace/StdFace_ModelUtil.c.o
cd /home/vagrant/build/hphi_3.3.0/obj-x86_64-linux-gnu/src && /usr/bin/cc -DDSFMT_MEXP=19937 -DMPI -D_HPhi -D_lapack -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/home/vagrant/build/hphi_3.3.0/src/include  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wall -D_FORTIFY_SOURCE=2 -fopenmp -O3 -DNDEBUG   -o CMakeFiles/HPhi.dir/StdFace/StdFace_ModelUtil.c.o   -c /home/vagrant/build/hphi_3.3.0/src/StdFace/StdFace_ModelUtil.c
/home/vagrant/build/hphi_3.3.0/src/StdFace/StdFace_ModelUtil.c: In function ‘StdFace_FindSite’:
/home/vagrant/build/hphi_3.3.0/src/StdFace/StdFace_ModelUtil.c:868:18: warning: ‘jCell’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   *jsite = jCell * StdI->NsiteUC + jsiteUC;
            ~~~~~~^~~~~~~~~~~~~~~
/home/vagrant/build/hphi_3.3.0/src/StdFace/StdFace_ModelUtil.c:867:18: warning: ‘iCell’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   *isite = iCell * StdI->NsiteUC + isiteUC;
            ~~~~~~^~~~~~~~~~~~~~~
[ 89%] Building C object src/CMakeFiles/HPhi.dir/StdFace/TriangularLattice.c.o
cd /home/vagrant/build/hphi_3.3.0/obj-x86_64-linux-gnu/src && /usr/bin/cc -DDSFMT_MEXP=19937 -DMPI -D_HPhi -D_lapack -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/home/vagrant/build/hphi_3.3.0/src/include  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wall -D_FORTIFY_SOURCE=2 -fopenmp -O3 -DNDEBUG   -o CMakeFiles/HPhi.dir/StdFace/TriangularLattice.c.o   -c /home/vagrant/build/hphi_3.3.0/src/StdFace/TriangularLattice.c
[ 90%] Building C object src/CMakeFiles/HPhi.dir/StdFace/Wannier90.c.o
cd /home/vagrant/build/hphi_3.3.0/obj-x86_64-linux-gnu/src && /usr/bin/cc -DDSFMT_MEXP=19937 -DMPI -D_HPhi -D_lapack -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/home/vagrant/build/hphi_3.3.0/src/include  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wall -D_FORTIFY_SOURCE=2 -fopenmp -O3 -DNDEBUG   -o CMakeFiles/HPhi.dir/StdFace/Wannier90.c.o   -c /home/vagrant/build/hphi_3.3.0/src/StdFace/Wannier90.c
/home/vagrant/build/hphi_3.3.0/src/StdFace/Wannier90.c: In function ‘StdFace_Wannier90’:
/home/vagrant/build/hphi_3.3.0/src/StdFace/Wannier90.c:678:60: warning: ‘Uspin’ may be used uninitialized in this function [-Wmaybe-uninitialized]
             * (1.0 / Uspin[tUJindx[0][it][3]] + 1.0 / Uspin[tUJindx[0][it][4]]);
                                                            ^
/home/vagrant/build/hphi_3.3.0/src/StdFace/Wannier90.c:614:3: warning: ‘nintrMax’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   StdFace_MallocInteractions(StdI, ntransMax, nintrMax);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/vagrant/build/hphi_3.3.0/src/StdFace/Wannier90.c:614:3: warning: ‘ntransMax’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/home/vagrant/build/hphi_3.3.0/src/StdFace/Wannier90.c:821:15: warning: ‘idcmode’ may be used uninitialized in this function [-Wmaybe-uninitialized]
             if(idcmode == FULL) { //Hartree-Forck correction
               ^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant