From af60ee0aa7714a539cf3f0cac589edbf3e64f846 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <gruenich@dune-project.org>
Date: Sun, 1 Jun 2014 16:36:44 +0200
Subject: [PATCH] Reduce number of warnings, especially unused typedefs.

---
 dune/istl/paamg/test/galerkintest.cc    |  3 ---
 dune/istl/paamg/test/parallelamgtest.cc |  1 -
 dune/istl/test/matrixtest.cc            | 15 ++++++++-------
 dune/istl/test/scaledidmatrixtest.cc    |  2 --
 4 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/dune/istl/paamg/test/galerkintest.cc b/dune/istl/paamg/test/galerkintest.cc
index f2aa196d8..417a26d77 100644
--- a/dune/istl/paamg/test/galerkintest.cc
+++ b/dune/istl/paamg/test/galerkintest.cc
@@ -118,9 +118,6 @@ void testCoarsenIndices(int N)
 
   Dune::Amg::GalerkinProduct<ParallelInformation> productBuilder;
 
-  typedef std::vector<bool> Vector;
-  typedef typename Vector::iterator Iterator;
-  //typedef Dune::IteratorPropertyMap<Iterator, Dune::IdentityMap> VisitedMap2;
   typedef Dune::IteratorPropertyMap<bool*, Dune::IdentityMap> VisitedMap2;
   /*
      Vector visited;
diff --git a/dune/istl/paamg/test/parallelamgtest.cc b/dune/istl/paamg/test/parallelamgtest.cc
index 3cae69fa2..495609746 100644
--- a/dune/istl/paamg/test/parallelamgtest.cc
+++ b/dune/istl/paamg/test/parallelamgtest.cc
@@ -85,7 +85,6 @@ void testAmg(int N, int coarsenTarget)
   typedef Dune::BCRSMatrix<MatrixBlock> BCRSMat;
   typedef Dune::FieldVector<double,BS> VectorBlock;
   typedef Dune::BlockVector<VectorBlock> Vector;
-  typedef int LocalId;
   typedef int GlobalId;
   typedef Dune::OwnerOverlapCopyCommunication<GlobalId> Communication;
   typedef Dune::OverlappingSchwarzOperator<BCRSMat,Vector,Vector,Communication> Operator;
diff --git a/dune/istl/test/matrixtest.cc b/dune/istl/test/matrixtest.cc
index 9f1489174..21ac0482b 100644
--- a/dune/istl/test/matrixtest.cc
+++ b/dune/istl/test/matrixtest.cc
@@ -9,6 +9,7 @@
 
 #include <dune/common/fmatrix.hh>
 #include <dune/common/diagonalmatrix.hh>
+#include <dune/common/unused.hh>
 #include <dune/istl/bcrsmatrix.hh>
 #include <dune/istl/matrix.hh>
 #include <dune/istl/bdmatrix.hh>
@@ -40,7 +41,7 @@ void testSuperMatrix(MatrixType& matrix)
 
   typedef typename MatrixType::size_type size_type;
 
-  typedef typename MatrixType::allocator_type allocator_type;
+  typedef typename MatrixType::allocator_type allocator_type DUNE_UNUSED;
 
   size_type n = matrix.N();
   size_type m = matrix.M();
@@ -62,19 +63,19 @@ void testMatrix(MatrixType& matrix, X& x, Y& y)
 
   typedef typename FieldTraits<field_type>::real_type real_type;
 
-  typedef typename MatrixType::block_type block_type;
+  typedef typename MatrixType::block_type block_type DUNE_UNUSED;
 
-  typedef typename MatrixType::row_type row_type;
+  typedef typename MatrixType::row_type row_type DUNE_UNUSED;
 
   typedef typename MatrixType::size_type size_type;
 
-  typedef typename MatrixType::RowIterator RowIterator;
+  typedef typename MatrixType::RowIterator RowIterator DUNE_UNUSED;
 
-  typedef typename MatrixType::ConstRowIterator ConstRowIterator;
+  typedef typename MatrixType::ConstRowIterator ConstRowIterator DUNE_UNUSED;
 
-  typedef typename MatrixType::ColIterator ColIterator;
+  typedef typename MatrixType::ColIterator ColIterator DUNE_UNUSED;
 
-  typedef typename MatrixType::ConstColIterator ConstColIterator;
+  typedef typename MatrixType::ConstColIterator ConstColIterator DUNE_UNUSED;
 
   assert(MatrixType::blocklevel >= 0);
 
diff --git a/dune/istl/test/scaledidmatrixtest.cc b/dune/istl/test/scaledidmatrixtest.cc
index dad86d8bb..2258db23a 100644
--- a/dune/istl/test/scaledidmatrixtest.cc
+++ b/dune/istl/test/scaledidmatrixtest.cc
@@ -17,8 +17,6 @@ using namespace Dune;
 template<class K, int n>
 void test_matrix()
 {
-  typedef typename ScaledIdentityMatrix<K,n>::size_type size_type;
-
   ScaledIdentityMatrix<K,n> A(1);
   FieldVector<K,n> f;
   FieldVector<K,n> v;
-- 
GitLab