diff --git a/.clang-tidy b/.clang-tidy index 910df6702f383cffe304c4d4a1b770670027868b..ddebeb83594141d959df897f3f84919e99a2e99f 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -28,6 +28,7 @@ modernize-*, -modernize-avoid-c-arrays, mpi-*, +-mpi-type-mismatch, openmp-*, -openmp-exception-escape, diff --git a/src/core/mpi/MPIWrapper.h b/src/core/mpi/MPIWrapper.h index 3cdc7d54626747d8a6d9010a2211e4ccfbbeb54d..14e72cc5dafb75281d599d03784d8c1d64462a43 100644 --- a/src/core/mpi/MPIWrapper.h +++ b/src/core/mpi/MPIWrapper.h @@ -61,7 +61,14 @@ namespace mpistubs { #pragma warning ( push, 1 ) #endif +#if ( defined WALBERLA_CXX_COMPILER_IS_GNU ) || ( defined WALBERLA_CXX_COMPILER_IS_CLANG ) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wsign-conversion" +#endif #include <mpi.h> +#if ( defined WALBERLA_CXX_COMPILER_IS_GNU ) || ( defined WALBERLA_CXX_COMPILER_IS_CLANG ) +# pragma GCC diagnostic pop +#endif #ifdef _MSC_VER #pragma warning ( pop ) @@ -284,8 +291,8 @@ using namespace mpistubs; namespace walberla { namespace mpi { - typedef int MPIRank; - typedef int MPISize; + using MPIRank = int; + using MPISize = int; const MPIRank INVALID_RANK = -1; const MPISize INVALID_SIZE = -1; } // namespace MPI