Silence multiple warnings.

Also add more warnings to the disabling list of disable_warnings.h.
This commit is contained in:
Atgeirr Flø Rasmussen 2015-05-28 14:05:09 +02:00
parent 7f266458b5
commit a5da86a9ec
3 changed files with 12 additions and 5 deletions

View File

@ -28,11 +28,14 @@
#include <exception> #include <exception>
#if HAVE_MPI && HAVE_DUNE_ISTL #if HAVE_MPI && HAVE_DUNE_ISTL
#include "mpi.h" #include <mpi.h>
#include <opm/core/utility/platform_dependent/disable_warnings.h>
#include <dune/istl/owneroverlapcopy.hh> #include <dune/istl/owneroverlapcopy.hh>
#include <dune/common/parallel/interface.hh> #include <dune/common/parallel/interface.hh>
#include <dune/common/parallel/communicator.hh> #include <dune/common/parallel/communicator.hh>
#include <dune/common/enumset.hh> #include <dune/common/enumset.hh>
#include <opm/core/utility/platform_dependent/reenable_warnings.h>
#include <algorithm> #include <algorithm>
#include <functional> #include <functional>

View File

@ -26,6 +26,8 @@
#error "This file needs to compiled with MPI support!" #error "This file needs to compiled with MPI support!"
#endif #endif
#include <opm/core/utility/platform_dependent/disable_warnings.h>
#include <dune/common/version.hh> #include <dune/common/version.hh>
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 3) #if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 3)
#include <dune/common/parallel/mpicollectivecommunication.hh> #include <dune/common/parallel/mpicollectivecommunication.hh>
@ -40,6 +42,8 @@
#include <dune/common/parallel/remoteindices.hh> #include <dune/common/parallel/remoteindices.hh>
#include <dune/istl/owneroverlapcopy.hh> #include <dune/istl/owneroverlapcopy.hh>
#include <opm/core/utility/platform_dependent/reenable_warnings.h>
#include <tuple> #include <tuple>
struct MPIFixture { struct MPIFixture {

View File

@ -48,8 +48,8 @@ void runSumMaxMinTest(const T offset)
auto mat = create1DLaplacian(*comm.indexSet(), N, start, end, istart, iend); auto mat = create1DLaplacian(*comm.indexSet(), N, start, end, istart, iend);
std::vector<T> x(end-start); std::vector<T> x(end-start);
assert(comm.indexSet()->size()==x.size()); assert(comm.indexSet()->size()==x.size());
for(auto i=comm.indexSet()->begin(), iend=comm.indexSet()->end(); i!=iend; ++i) for(auto it=comm.indexSet()->begin(), itend=comm.indexSet()->end(); it!=itend; ++it)
x[i->local()]=i->global()+offset; x[it->local()]=it->global()+offset;
auto containers = std::make_tuple(x, x, x, x); auto containers = std::make_tuple(x, x, x, x);
auto operators = std::make_tuple(Opm::Reduction::makeGlobalSumFunctor<T>(), auto operators = std::make_tuple(Opm::Reduction::makeGlobalSumFunctor<T>(),
Opm::Reduction::makeGlobalMaxFunctor<T>(), Opm::Reduction::makeGlobalMaxFunctor<T>(),
@ -94,8 +94,8 @@ BOOST_AUTO_TEST_CASE(singleContainerReductionTest)
auto mat = create1DLaplacian(*comm.indexSet(), N, start, end, istart, iend); auto mat = create1DLaplacian(*comm.indexSet(), N, start, end, istart, iend);
std::vector<int> x(end-start); std::vector<int> x(end-start);
assert(comm.indexSet()->size()==x.size()); assert(comm.indexSet()->size()==x.size());
for(auto i=comm.indexSet()->begin(), iend=comm.indexSet()->end(); i!=iend; ++i) for(auto it=comm.indexSet()->begin(), itend=comm.indexSet()->end(); it!=itend; ++it)
x[i->local()]=i->global(); x[it->local()]=it->global();
int value = 1; int value = 1;
int oldvalue = value; int oldvalue = value;
comm.computeReduction(x,Opm::Reduction::makeGlobalSumFunctor<int>(),value); comm.computeReduction(x,Opm::Reduction::makeGlobalSumFunctor<int>(),value);