From 25eec4e046a2861830148b92ff5cec4f1a0f21f6 Mon Sep 17 00:00:00 2001 From: Olivier Parcollet Date: Wed, 21 May 2014 11:27:39 +0200 Subject: [PATCH] Silence some gcc warnings... - Silence some trivial warning. - TODO: narrowing in a few places. --- test/triqs/arrays/h5_vector_array.cpp | 4 ++-- triqs/arrays/h5/simple_read_write.cpp | 2 +- triqs/arrays/h5/simple_read_write.hpp | 1 + triqs/arrays/indexmaps/common.hpp | 6 ------ triqs/arrays/indexmaps/permutation.hpp | 2 +- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/test/triqs/arrays/h5_vector_array.cpp b/test/triqs/arrays/h5_vector_array.cpp index c96ff79b..07aa9342 100644 --- a/test/triqs/arrays/h5_vector_array.cpp +++ b/test/triqs/arrays/h5_vector_array.cpp @@ -52,8 +52,8 @@ int main(int argc, char **argv) { h5_read(top2,"vdouble",v2); h5_read(top2,"vcomplex",vc2); - for (int i = 0; i d2(R); hsize_t dims_out[rank]; dataspace.getSimpleExtentDims(&dims_out[0], NULL); - for (size_t u = 0; u < R; ++u) d2[u] = dims_out[u]; + for (int u = 0; u < R; ++u) d2[u] = dims_out[u]; return d2; } TRIQS_ARRAYS_H5_CATCH_EXCEPTION; diff --git a/triqs/arrays/h5/simple_read_write.hpp b/triqs/arrays/h5/simple_read_write.hpp index 99296336..dbd53393 100644 --- a/triqs/arrays/h5/simple_read_write.hpp +++ b/triqs/arrays/h5/simple_read_write.hpp @@ -74,6 +74,7 @@ namespace arrays { template void read_array_impl(h5::group g, std::string const& name, T* start, array_stride_info info); template void read_array(h5::group g, std::string const& name, A&& a, bool C_reorder = true) { + // mini_vector... : useless on 4.9 and clang, there seems to be a bug (??) on 4.8. resize_or_check(a, mini_vector::rank> (get_array_lengths(a.rank, g, name, triqs::is_complex::value_type>::value))); if (C_reorder) { { diff --git a/triqs/arrays/indexmaps/common.hpp b/triqs/arrays/indexmaps/common.hpp index 031d02fb..7d7f8d5b 100644 --- a/triqs/arrays/indexmaps/common.hpp +++ b/triqs/arrays/indexmaps/common.hpp @@ -32,12 +32,6 @@ namespace triqs { namespace arrays { using utility::mini_vector; // make_shape - // generalize with preproc or variadic template -//#define IMPL(z, NN, unused) \ -// template mini_vector make_shape(BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(NN), T I_)) \ -// { return mini_vector(BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(NN), I_));} -// BOOST_PP_REPEAT(ARRAY_NRANK_MAX , IMPL, nil) -//#undef IMPL template mini_vector make_shape(size_t x0, T... args) { return mini_vector (x0,args...);} diff --git a/triqs/arrays/indexmaps/permutation.hpp b/triqs/arrays/indexmaps/permutation.hpp index 6d18c1a3..c3a3c0d7 100644 --- a/triqs/arrays/indexmaps/permutation.hpp +++ b/triqs/arrays/indexmaps/permutation.hpp @@ -55,7 +55,7 @@ namespace triqs { namespace arrays { namespace permutations { inline void print( std::ostream & out, ull perm) { out << "("; - for (int i =0; i< permutations::size(perm); ++i) { out << (i!=0 ? " " : "") << apply(perm,i);} + for (int i =0; i< int(permutations::size(perm)); ++i) { out << (i!=0 ? " " : "") << apply(perm,i);} out << ")"; } }