[petsc-dev] [petsc-users] Compiler Warning

Barry Smith bsmith at mcs.anl.gov
Wed Nov 3 19:48:21 CDT 2010

On Nov 3, 2010, at 7:44 PM, Jed Brown wrote:

> On Wed, Nov 3, 2010 at 12:50, Barry Smith <bsmith at mcs.anl.gov> wrote:
> Because of the || *r2 may never get set, but it gets used later in the routine. Maybe compilers shouldn't give the warning but some did.
> But the uninitialized value can't be used if PetscMallocX failed because the error is checked and the error handler is invoked.  Was the problem only in some case where the error code was not being checked, or was it more than that?  Spurious uninitialized warnings are obnoxious, are they worth pandering to?

  I would say it was spurious, but users building PETSc won't know it is spurious and I like clean compiles with no warnings (even if the warnings are wrong).


>  I can't reproduce them with any of my compilers.
> Jed

More information about the petsc-dev mailing list