Commits

Karl Rupp committed 3ea5f9a

CUSP: Fixed uninitialized variable warning in VecScatterBegin_SSToSS()

This was actually dangerous and potentially harmful. Thanks to the compiler.

  • Participants
  • Parent commits 8ab02f2

Comments (0)

Files changed (1)

File src/vec/vec/utils/vscat.c

   if (x->valid_GPU_array == PETSC_CUSP_GPU) {
     /* create the scatter indices if not done already */
     if (!ctx->spptr) {
-      PetscInt *tslots = 0,*fslots;
+      PetscInt *tslots = 0,*fslots = 0;
       ierr = VecScatterCUSPIndicesCreate_StoS(n,to_first,from_first,to_step,from_step,tslots,fslots,(PetscCUSPIndices*)&(ctx->spptr));CHKERRQ(ierr);
     }
     /* next do the scatter */