[petsc-dev] plex warnings in next

Matthew Knepley knepley at gmail.com
Sat Feb 15 11:38:28 CST 2014


Fixing. I will get all the plex stuff done today.

  Matt


On Sat, Feb 15, 2014 at 11:36 AM, Barry Smith <bsmith at mcs.anl.gov> wrote:

>
>          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
>
>
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20140215/f8cbefa2/attachment.html>


More information about the petsc-dev mailing list