From 383fdb04ae973caf6dbee0b90f54cb3730602668 Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@Germany> Date: Fri, 10 Mar 2017 10:27:17 +0100 Subject: [PATCH] COMP: suppress warnings about MPI old-style cast (GCC only) --- src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C | 10 ++++------ src/renumber/zoltanRenumber/zoltanRenumber.C | 1 + 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C b/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C index f57e7d2aac5..c459252e1cd 100644 --- a/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C +++ b/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C @@ -207,13 +207,11 @@ License #include "globalIndex.H" #include "SubField.H" -extern "C" -{ - #include <stdio.h> - #include <mpi.h> - #include "ptscotch.h" -} +#pragma GCC diagnostic ignored "-Wold-style-cast" +#include <cstdio> +#include <mpi.h> +#include "ptscotch.h" // Hack: scotch generates floating point errors so need to switch of error // trapping! diff --git a/src/renumber/zoltanRenumber/zoltanRenumber.C b/src/renumber/zoltanRenumber/zoltanRenumber.C index da7a2957b53..2d7a744debb 100644 --- a/src/renumber/zoltanRenumber/zoltanRenumber.C +++ b/src/renumber/zoltanRenumber/zoltanRenumber.C @@ -57,6 +57,7 @@ SourceFiles #include "globalIndex.H" #include "uint.H" +#pragma GCC diagnostic ignored "-Wold-style-cast" #include "zoltan.h" #include <mpi.h> -- GitLab