[petsc-dev] plex warnings in next

Barry Smith bsmith at mcs.anl.gov
Sat Feb 15 11:36:39 CST 2014


         CC arch-clang/obj/src/dm/impls/plex/plexgeometry.o
/Users/barrysmith/Src/PETSc/src/dm/impls/plex/plex.c:2298:9: warning: variable 'match' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
    if (numLeaves >= 0) {
        ^~~~~~~~~~~~~~
/Users/barrysmith/Src/PETSc/src/dm/impls/plex/plex.c:2346:10: note: uninitialized use occurs here
    if (!match) {for (c = cStart; c < cEnd; ++c) {ierr = PetscBTNegate(flippedCells, c-cStart);CHKERRQ(ierr);}}
         ^~~~~
/Users/barrysmith/Src/PETSc/src/dm/impls/plex/plex.c:2298:5: note: remove the 'if' if its condition is always true
    if (numLeaves >= 0) {
    ^~~~~~~~~~~~~~~~~~~~
/Users/barrysmith/Src/PETSc/src/dm/impls/plex/plex.c:2294:5: note: variable 'match' is declared here
    PetscBool          match;
    ^
/Users/barrysmith/Src/PETSc/src/dm/impls/plex/plex.c:2326:25: warning: variable 'coneSize' is uninitialized when used here [-Wuninitialized]
        for (c = 0; c < coneSize; ++c) if (cone[c] == face) break;
                        ^~~~~~~~
/Users/barrysmith/Src/PETSc/src/dm/impls/plex/plex.c:2315:31: note: initialize the variable 'coneSize' to silence this warning
      PetscInt        coneSize, supportSize;
                              ^
                               = 0





More information about the petsc-dev mailing list