Satish Balay <[email protected]> writes: > On Thu, 7 Apr 2016, Jed Brown wrote: > >> Barry Smith <[email protected]> writes: >> > Should we caste to an unsigned PetscInt first then? >> >> It should be unsigned, yes. Does that fix the warning? > > Nope.. > > Commenting out the following line - or changing the argument thus is > making a difference. > > diff --git a/src/mat/impls/baij/seq/baijfact.c > b/src/mat/impls/baij/seq/baijfact.c > index fea37cb..e2c210c 100644 > --- a/src/mat/impls/baij/seq/baijfact.c > +++ b/src/mat/impls/baij/seq/baijfact.c > @@ -1081,7 +1081,7 @@ PetscErrorCode MatICCFactorSymbolic_SeqBAIJ(Mat > fact,Mat A,IS perm,const MatFact > ncols_upper++; > } > } > - ierr = > PetscIncompleteLLAdd(ncols_upper,cols,levels,cols_lvl,am,nlnk,lnk,lnk_lvl,lnkbt);CHKERRQ(ierr); > + ierr = > PetscIncompleteLLAdd(ncols,cols,levels,cols_lvl,am,nlnk,lnk,lnk_lvl,lnkbt);CHKERRQ(ierr);
That looks like it changes the semantics. In any case, that file wasn't even mentioned in the message that Barry shared. If it is indeed the same issue, then it would appear that the static analyzer has determined that it is possible for index to be negative.
signature.asc
Description: PGP signature
