From 25a023b5690d865609778d6350be04f9f6a9263e Mon Sep 17 00:00:00 2001 From: young Date: Sun, 13 Jan 2013 16:07:24 +0000 Subject: [PATCH] Use void() not Assert(NULL) to supress compiler warning. git-svn-id: https://svn.dealii.org/trunk@28036 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/lac/slepc_solver.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/deal.II/source/lac/slepc_solver.cc b/deal.II/source/lac/slepc_solver.cc index 7b218cd132..7f73e250e8 100644 --- a/deal.II/source/lac/slepc_solver.cc +++ b/deal.II/source/lac/slepc_solver.cc @@ -375,12 +375,13 @@ namespace SLEPcWrappers this->solver_control.max_steps()); AssertThrow (ierr == 0, ExcSLEPcError(ierr)); #else - // PETSc/SLEPc version must be > 3.1.0 (supress compiler warning - // by performing a void operation on eps). + // Supress compiler warnings about unused paameters. + (void) eps; + + // PETSc/SLEPc version must be > 3.1.0. Assert (false, ExcMessage ("Your SLEPc installation does not include a copy of the " "Generalized Davidson solver. A SLEPc version > 3.1.0 is required.")); - Assert (eps, ExcSLEPcWrappersUsageError()); #endif } @@ -407,12 +408,13 @@ namespace SLEPcWrappers this->solver_control.max_steps()); AssertThrow (ierr == 0, ExcSLEPcError(ierr)); #else - // PETSc/SLEPc version must be > 3.1.0 (supress compiler warning - // by performing a void operation on eps). + // Supress compiler warnings about unused paameters. + (void) eps; + + // PETSc/SLEPc version must be > 3.1.0. Assert ((false), ExcMessage ("Your SLEPc installation does not include a copy of the " "Jacobi-Davidson solver. A SLEPc version > 3.1.0 is required.")); - Assert (eps, ExcSLEPcWrappersUsageError()); #endif } -- 2.39.5