Skip to content

Commit

Permalink
changed: use PETSC_NULLPTR
Browse files Browse the repository at this point in the history
for PETSc < 3.19 we define this to PETSC_NULL.
use of PETSC_NULL causes a deprecation warning in 3.19
  • Loading branch information
akva2 committed Sep 4, 2023
1 parent 9014cc6 commit 6aeefcd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/LinAlg/LinAlgInit.C
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ LinAlgInit::LinAlgInit (int argc, char** argv)
#if defined(HAS_SLEPC)
SlepcInitialize(&argc,&argv,(char*)0,PETSC_NULL);
#elif defined(HAS_PETSC)
PetscInitialize(&argc,&argv,(char*)0,PETSC_NULL);
PetscInitialize(&argc,&argv,(char*)0,PETSC_NULLPTR);
#endif
#ifdef HAVE_MPI
#ifndef HAS_PETSC
Expand Down
4 changes: 4 additions & 0 deletions src/LinAlg/PETScSupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
#include "slepceps.h"
#endif

#ifndef PETSC_NULLPTR
#define PETSC_NULLPTR PETSC_NULL
#endif

#else
typedef int PetscInt; //!< To avoid compilation failures
typedef double PetscReal; //!< To avoid compilation failures
Expand Down

0 comments on commit 6aeefcd

Please sign in to comment.