]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Patch by Uwe Koecher: Avoid warnings in header files if -Wunused-parameters is given...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 28 Jun 2012 22:43:19 +0000 (22:43 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 28 Jun 2012 22:43:19 +0000 (22:43 +0000)
git-svn-id: https://svn.dealii.org/trunk@25658 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/base/geometry_info.h
deal.II/include/deal.II/base/work_stream.h
deal.II/include/deal.II/fe/fe_values.h
deal.II/include/deal.II/grid/tria_accessor.h
deal.II/include/deal.II/lac/full_matrix.h
deal.II/include/deal.II/lac/trilinos_sparse_matrix.h
deal.II/include/deal.II/lac/trilinos_vector_base.h

index 05e7db996da7c51f4f6ccf1c65992020a6f0ac76..f33bac3968019b753a32f723391bd8b8a2014675 100644 (file)
@@ -2607,6 +2607,7 @@ GeometryInfo<1>::cell_to_child_coordinates (const Point<1>         &p,
           ExcIndexRange (child_index, 0, 2));
   Assert (refine_case==RefinementCase<1>::cut_x,
           ExcInternalError());
+  (void)refine_case; // removes -Wunused-parameter warning in optimized mode
 
   return p*2.0-unit_cell_vertex(child_index);
 }
@@ -2751,6 +2752,7 @@ GeometryInfo<1>::child_to_cell_coordinates (const Point<1>         &p,
           ExcIndexRange (child_index, 0, 2));
   Assert (refine_case==RefinementCase<1>::cut_x,
           ExcInternalError());
+  (void)refine_case; // removes -Wunused-parameter warning in optimized mode
 
   return (p+unit_cell_vertex(child_index))*0.5;
 }
index 1b39b5c8e731075a61309d6ab403f5079ec35140..dd6fd8a93cb84cabaa2c27c6a90be582df888c2e 100644 (file)
@@ -515,8 +515,10 @@ namespace WorkStream
     Assert (queue_length > 0,
             ExcMessage ("The queue length must be at least one, and preferably "
                         "larger than the number of processors on this system."));
+    (void)queue_length; // removes -Wunused-parameter warning in optimized mode
     Assert (chunk_size > 0,
             ExcMessage ("The chunk_size must be at least one."));
+    (void)chunk_size; // removes -Wunused-parameter warning in optimized mode
 
                                      // if no work then skip. (only use
                                      // operator!= for iterators since we may
index c4ba055eac4d7f4f3c0061b4874c3ca5cc06064c..fcdf99f5e993986e0f6816b0e883b2462cb579ec 100644 (file)
@@ -4325,6 +4325,7 @@ namespace FEValuesViews
                            const Tensor<1,1> &t)
     {
       Assert (n < 1, ExcIndexRange (n, 0, 1));
+      (void)n; // removes -Wunused-parameter warning in optimized mode
 
       const double array[1] = { t[0] };
       return dealii::SymmetricTensor<2,1>(array);
index 0c63c94c69344da0d04594f9a50d735bac188a37..25f0a3e24db4c9bd95b424be61c00a217f551820 100644 (file)
@@ -77,6 +77,7 @@ namespace internal
             type (const int level)
               {
                 Assert (level == 0, ExcInternalError());
+               (void)level; // removes -Wunused-parameter warning in optimized mode
               }
 
                                              /**
index 51708e58f63c52e41aef42de7647a939f2579216..6e33ecc93a4854de2ba447be5d86c5c2302fc9bc 100644 (file)
@@ -1492,6 +1492,7 @@ FullMatrix<number> &
 FullMatrix<number>::operator = (const number d)
 {
   Assert (d==number(0), ExcScalarAssignmentOnlyForZeroValue());
+  (void)d; // removes -Wunused-parameter warning in optimized mode
 
   if (this->n_elements() != 0)
     memset (&this->values[0], 0, this->n_elements()*sizeof(number));
index ff64607164af923bb7742f04ae6be6edddb5501b..ef463416db273f5382ed93ac355a77e00ada2566 100644 (file)
@@ -2855,6 +2855,7 @@ namespace TrilinosWrappers
                                           row_partitioner(), false);
 
             Assert (ierr == 0, ExcTrilinosError(ierr));
+           (void)ierr; // removes -Wunused-but-set-variable in optimized mode
           }
 
         last_action = Add;
@@ -3195,6 +3196,7 @@ namespace TrilinosWrappers
   {
     const int ierr = matrix->Scale (a);
     Assert (ierr == 0, ExcTrilinosError(ierr));
+    (void)ierr; // removes -Wunused-variable in optimized mode
 
     return *this;
   }
@@ -3211,6 +3213,7 @@ namespace TrilinosWrappers
 
     const int ierr = matrix->Scale (factor);
     Assert (ierr == 0, ExcTrilinosError(ierr));
+    (void)ierr; // removes -Wunused-variable in optimized mode
 
     return *this;
   }
@@ -3233,6 +3236,7 @@ namespace TrilinosWrappers
     const int ierr = matrix->Multiply (false, src.trilinos_vector(),
                                        dst.trilinos_vector());
     Assert (ierr == 0, ExcTrilinosError(ierr));
+    (void)ierr; // removes -Wunused-variable in optimized mode
   }
 
 
@@ -3254,6 +3258,7 @@ namespace TrilinosWrappers
 
     const int ierr = matrix->Multiply (false, tril_src, tril_dst);
     Assert (ierr == 0, ExcTrilinosError(ierr));
+    (void)ierr; // removes -Wunused-variable in optimized mode
   }
 
 
@@ -3274,6 +3279,7 @@ namespace TrilinosWrappers
     const int ierr = matrix->Multiply (true, src.trilinos_vector(),
                                        dst.trilinos_vector());
     Assert (ierr == 0, ExcTrilinosError(ierr));
+    (void)ierr; // removes -Wunused-variable in optimized mode
   }
 
 
@@ -3295,6 +3301,7 @@ namespace TrilinosWrappers
 
     const int ierr = matrix->Multiply (true, tril_src, tril_dst);
     Assert (ierr == 0, ExcTrilinosError(ierr));
+    (void)ierr; // removes -Wunused-variable in optimized mode
   }
 
 
index dc77b335fe68b37a58e22dcd850041577f9c19a0..c3d422bcfce8472e275fc29ee754018c413a49c4 100644 (file)
@@ -1753,6 +1753,7 @@ namespace TrilinosWrappers
 
     const int jerr = vector->Update(c, *(x.vector), 1.);
     Assert (jerr == 0, ExcTrilinosError(jerr));
+    (void)jerr; // removes -Wunused-parameter warning in optimized mode
   }
 
 

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.