Skip to content

Commit 8a83b31

Browse files
committed
changed: use PETSC_NULLPTR
for PETSc < 3.19 we define this to PETSC_NULL. use of PETSC_NULL causes a deprecation warning in 3.19
1 parent 13690e0 commit 8a83b31

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/LinAlg/LinAlgInit.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ LinAlgInit::LinAlgInit (int argc, char** argv)
3636
#if defined(HAS_SLEPC)
3737
SlepcInitialize(&argc,&argv,(char*)0,PETSC_NULL);
3838
#elif defined(HAS_PETSC)
39-
PetscInitialize(&argc,&argv,(char*)0,PETSC_NULL);
39+
PetscInitialize(&argc,&argv,(char*)0,PETSC_NULLPTR);
4040
#endif
4141
#ifdef HAVE_MPI
4242
#ifndef HAS_PETSC

src/LinAlg/PETScSupport.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
#include "slepceps.h"
4242
#endif
4343

44+
#ifndef PETSC_NULLPTR
45+
#define PETSC_NULLPTR PETSC_NULL
46+
#endif
47+
4448
#else
4549
typedef int PetscInt; //!< To avoid compilation failures
4650
typedef double PetscReal; //!< To avoid compilation failures

0 commit comments

Comments
 (0)