]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make compile with gcc-4.6. Avoid some warnings about unused variables.
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Mon, 28 Mar 2011 09:21:39 +0000 (09:21 +0000)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Mon, 28 Mar 2011 09:21:39 +0000 (09:21 +0000)
git-svn-id: https://svn.dealii.org/trunk@23540 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/lac/relaxation_block.templates.h
deal.II/include/deal.II/lac/sparse_matrix.templates.h
deal.II/include/deal.II/lac/vector.h
deal.II/include/deal.II/numerics/mesh_worker_loop.h
deal.II/source/lac/sparse_direct.cc

index dbc3a56980ba198e4d59d9dc34dec1fc2c4578d0..23f197273d89764cbb4881f4fb99c0a854564461 100644 (file)
@@ -103,7 +103,6 @@ RelaxationBlock<MATRIX,inverse_type>::invert_diagblocks ()
                                           // into the matrix for the
                                           // diagonal block
          BlockList::const_iterator row = additional_data.block_list->begin(block);
-         BlockList::const_iterator end = additional_data.block_list->end(block);
          for (unsigned int row_cell=0; row_cell<bs; ++row_cell, ++row)
            {
 //TODO:[GK] Optimize here
@@ -173,7 +172,6 @@ RelaxationBlock<MATRIX,inverse_type>::do_step (
       x_cell.reinit(bs);
                                       // Collect off-diagonal parts
       BlockList::const_iterator row = additional_data.block_list->begin(block);
-      BlockList::const_iterator end = additional_data.block_list->end(block);
       for (unsigned int row_cell=0; row_cell<bs; ++row_cell, ++row)
        {
          b_cell(row_cell) = src(*row);
index 24b6b8dd1d5c440e8af30cbda4f0267956d798a1..c4d1711b57f4b73ffbc3d5b83b8c8e9e42ecdef0 100644 (file)
@@ -626,7 +626,7 @@ SparseMatrix<number>::vmult (OutVector& dst,
   Assert (!PointerComparison::equal(&src, &dst), ExcSourceEqualsDestination());
 
   parallel::apply_to_subranges (0U, m(),
-                               std_cxx1x::bind (internal::SparseMatrix::vmult_on_subrange
+                               std_cxx1x::bind (&internal::SparseMatrix::vmult_on_subrange
                                                 <number,InVector,OutVector>,
                                                 _1, _2,
                                                 val,
@@ -681,7 +681,7 @@ SparseMatrix<number>::vmult_add (OutVector& dst,
   Assert (!PointerComparison::equal(&src, &dst), ExcSourceEqualsDestination());
 
   parallel::apply_to_subranges (0U, m(),
-                               std_cxx1x::bind (internal::SparseMatrix::vmult_on_subrange
+                               std_cxx1x::bind (&internal::SparseMatrix::vmult_on_subrange
                                                 <number,InVector,OutVector>,
                                                 _1, _2,
                                                 val,
@@ -769,7 +769,7 @@ SparseMatrix<number>::matrix_norm_square (const Vector<somenumber>& v) const
 
   return
     parallel::accumulate_from_subranges<number>
-    (std_cxx1x::bind (internal::SparseMatrix::matrix_norm_sqr_on_subrange
+    (std_cxx1x::bind (&internal::SparseMatrix::matrix_norm_sqr_on_subrange
                      <number,Vector<somenumber> >,
                      _1, _2,
                      val, cols->rowstart, cols->colnums,
@@ -834,7 +834,7 @@ SparseMatrix<number>::matrix_scalar_product (const Vector<somenumber>& u,
 
   return
     parallel::accumulate_from_subranges<number>
-    (std_cxx1x::bind (internal::SparseMatrix::matrix_scalar_product_on_subrange
+    (std_cxx1x::bind (&internal::SparseMatrix::matrix_scalar_product_on_subrange
                      <number,Vector<somenumber> >,
                      _1, _2,
                      val, cols->rowstart, cols->colnums,
@@ -1242,7 +1242,7 @@ SparseMatrix<number>::residual (Vector<somenumber>       &dst,
 
   return
     std::sqrt (parallel::accumulate_from_subranges<number>
-              (std_cxx1x::bind (internal::SparseMatrix::residual_sqr_on_subrange
+              (std_cxx1x::bind (&internal::SparseMatrix::residual_sqr_on_subrange
                                 <number,Vector<somenumber>,Vector<somenumber> >,
                                 _1, _2,
                                 val, cols->rowstart, cols->colnums,
index 03ce3e770233c2caff5d3bd013f2c4a026829512..25219945adea22bd8eb674bcb6691739fff501c0 100644 (file)
@@ -958,18 +958,18 @@ class Vector : public Subscriptor
                                      */
     std::size_t memory_consumption () const;
                                     //@}
-       
+
                      /**
                       * Write the data of this object to
                       * a stream for the purpose of serialization.
-                      */ 
+                      */
     template <class Archive>
     void save (Archive & ar, const unsigned int version) const;
 
                      /**
-                      * Read the data of this object 
+                      * Read the data of this object
                       * from a stream for the purpose of serialization.
-                      */    
+                      */
     template <class Archive>
     void load (Archive & ar, const unsigned int version);
 
@@ -1494,7 +1494,7 @@ Vector<Number>::save (Archive & ar, const unsigned int) const
                                      // forward to serialization
                                      // function in the base class.
   ar &  static_cast<const Subscriptor &>(*this);
-  
+
   ar & vec_size & max_vec_size ;
   ar & boost::serialization::make_array(val, max_vec_size);
 }
@@ -1510,9 +1510,9 @@ Vector<Number>::load (Archive & ar, const unsigned int)
                                      // forward to serialization
                                      // function in the base class.
   ar &  static_cast<Subscriptor &>(*this);
-  
+
   ar & vec_size & max_vec_size ;
-  
+
   val = new Number[max_vec_size];
   ar & boost::serialization::make_array(val, max_vec_size);
 }
@@ -1550,7 +1550,7 @@ inline
 std::ostream&
 operator << (std::ostream& os, const Vector<number>& v)
 {
-  v.print(os);  
+  v.print(os);
   return os;
 }
 
@@ -1563,7 +1563,7 @@ LogStream&
 operator << (LogStream& os, const Vector<number>& v)
 {
   v.print(os);
-  return os;  
+  return os;
 }
 
 
index 1584ad9269c40de1e37626d1b62ce54dcba02506..89a3e88bb3b15b70c11a18a7524eee858cdf1501 100644 (file)
@@ -260,9 +260,9 @@ namespace MeshWorker
                                     // Loop over all cells
 #ifdef DEAL_II_MESHWORKER_PARALLEL
     WorkStream::run(begin, end,
-                   std_cxx1x::bind(cell_action<INFOBOX, DOFINFO, dim, spacedim, ITERATOR>, _1, _3, _2,
-                                   cell_worker, boundary_worker, face_worker, cells_first, true),
-                   std_cxx1x::bind(internal::assemble<dim,DOFINFO,ASSEMBLER>, _1, &assembler),
+                   std_cxx1x::bind(&cell_action<INFOBOX, DOFINFO, dim, spacedim, ITERATOR>, _1, _3, _2,
+                                   cell_worker, boundary_worker, face_worker, cells_first, true),
+                   std_cxx1x::bind(&internal::assemble<dim,DOFINFO,ASSEMBLER>, _1, &assembler),
                    info, dof_info);
 #else
     for (ITERATOR cell = begin; cell != end; ++cell)
index a1e9b2111a410799aa0ebdb65f135bdcea197d52..30f9448ae696dcee498e5d2fdb66ccf619595f81 100644 (file)
@@ -408,7 +408,7 @@ SparseDirectMA27::~SparseDirectMA27()
                                         // avoid compiler warnings
 //TODO:[WB] Should t be used to trace errors?
         ssize_t t = write (detached_mode_data->server_client_pipe[1], "7", 1);
-       t = 0;
+       (void)t;
                                          // then also delete data
         delete detached_mode_data;
         detached_mode_data = 0;
@@ -462,7 +462,7 @@ SparseDirectMA27::initialize (const SparsityPattern &sp)
                                       // warnings
 //TODO:[WB] Use t to trace errors?      
       int t = pipe(detached_mode_data->server_client_pipe);
-      t = pipe(detached_mode_data->client_server_pipe);      
+      (void)t;      
 
                                        // fflush(NULL) is said to be a
                                        // good idea before fork()

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.