]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Suppress warning in release mode. 2402/head
authorBruno Turcksin <bruno.turcksin@gmail.com>
Thu, 24 Mar 2016 14:32:24 +0000 (10:32 -0400)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Thu, 24 Mar 2016 14:32:24 +0000 (10:32 -0400)
source/lac/trilinos_epetra_vector.cc

index 953173f2751745003f654da7ce3be191daa51504..854de65ff77ee758b4fcfe895b655f6879cc2587 100644 (file)
@@ -66,8 +66,8 @@ namespace LinearAlgebra
       else if (omit_zeroing_entries==false)
         {
           const int ierr = vector->PutScalar(0.);
-          (void) ierr;
           Assert(ierr==0, ExcTrilinosError(ierr));
+          (void) ierr;
         }
     }
 
@@ -89,6 +89,7 @@ namespace LinearAlgebra
 
               const int ierr = vector->Import(V.trilinos_vector(), data_exchange, Insert);
               Assert(ierr==0, ExcTrilinosError(ierr));
+              (void) ierr;
             }
           else
             vector.reset(new Epetra_FEVector(V.trilinos_vector()));
@@ -181,8 +182,8 @@ namespace LinearAlgebra
 #if DEAL_II_TRILINOS_VERSION_GTE(11,11,0)
           Epetra_Import data_exchange (vector->Map(), down_V.trilinos_vector().Map());
           int ierr = vector->Import(down_V.trilinos_vector(), data_exchange, Epetra_AddLocalAlso);
-          (void) ierr;
           Assert(ierr==0, ExcTrilinosError(ierr));
+          (void) ierr;
 #else
           // In versions older than 11.11 the Import function is broken for adding
           // Hence, we provide a workaround in this case
@@ -191,12 +192,12 @@ namespace LinearAlgebra
           Epetra_Import data_exchange(dummy.Map(), down_V.trilinos_vector().Map());
 
           int ierr = dummy.Import(down_V.trilinos_vector(), data_exchange, Insert);
-          (void) ierr;
           Assert(ierr==0, ExcTrilinosError(ierr));
+          (void) ierr;
 
           ierr = vector->Update(1.0, dummy, 1.0);
-          (void) ierr;
           Assert(ierr==0, ExcTrilinosError(ierr));
+          (void) ierr;
 #endif
         }
 
@@ -229,8 +230,8 @@ namespace LinearAlgebra
 
       double result(0.);
       const int ierr = vector->Dot(down_V.trilinos_vector(), &result);
-      (void) ierr;
       Assert(ierr==0, ExcTrilinosError(ierr));
+      (void) ierr;
 
       return result;
     }
@@ -261,6 +262,7 @@ namespace LinearAlgebra
 
       const int ierr = vector->Update(a, down_V.trilinos_vector(), 1.);
       Assert(ierr==0, ExcTrilinosError(ierr));
+      (void) ierr;
     }
 
 
@@ -289,6 +291,7 @@ namespace LinearAlgebra
       const int ierr = vector->Update(a, down_V.trilinos_vector(), b,
                                       down_W.trilinos_vector(), 1.);
       Assert(ierr==0, ExcTrilinosError(ierr));
+      (void) ierr;
     }
 
 
@@ -325,6 +328,7 @@ namespace LinearAlgebra
       const int ierr = vector->Multiply(1.0, down_scaling_factors.trilinos_vector(),
                                         *vector, 0.0);
       Assert(ierr==0, ExcTrilinosError(ierr));
+      (void) ierr;
     }
 
 
@@ -345,6 +349,7 @@ namespace LinearAlgebra
           // Otherwise, just update
           int ierr = vector->Update(a, down_V.trilinos_vector(), 0.);
           Assert(ierr==0, ExcTrilinosError(ierr));
+          (void) ierr;
         }
     }
 
@@ -355,6 +360,7 @@ namespace LinearAlgebra
       double norm(0.);
       int ierr = vector->Norm1(&norm);
       Assert(ierr==0, ExcTrilinosError(ierr));
+      (void) ierr;
 
       return norm;
     }
@@ -366,6 +372,7 @@ namespace LinearAlgebra
       double norm(0.);
       int ierr = vector->Norm2(&norm);
       Assert(ierr==0, ExcTrilinosError(ierr));
+      (void) ierr;
 
       return norm;
     }
@@ -377,6 +384,7 @@ namespace LinearAlgebra
       double norm(0.);
       int ierr = vector->NormInf(&norm);
       Assert(ierr==0, ExcTrilinosError(ierr));
+      (void) ierr;
 
       return norm;
     }
@@ -472,6 +480,7 @@ namespace LinearAlgebra
       int ierr = vector->ExtractView(&val, &leading_dimension);
 
       Assert(ierr==0, ExcTrilinosError(ierr));
+      (void) ierr;
       out.precision (precision);
       if (scientific)
         out.setf(std::ios::scientific, std::ios::floatfield);

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.