From 4e42972ebba6e3ea30dc4784471251735ecdbfb3 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Thu, 8 Oct 2015 16:57:12 +0200 Subject: [PATCH] src/include/h5core/h5.h - typedef MPI_Comm to int if we compile serial code - suppress warning about unused variables in definition of MPI_Comm_size() and MPI_Comm_rank() --- src/include/h5core/h5.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/include/h5core/h5.h b/src/include/h5core/h5.h index 4a298a2..c247dea 100644 --- a/src/include/h5core/h5.h +++ b/src/include/h5core/h5.h @@ -15,9 +15,10 @@ // dummy MPI calls for serial code #if !defined (PARALLEL_IO) +typedef int MPI_Comm; #define MPI_Init(argc, argv) -#define MPI_Comm_size(comm, nprocs) { *nprocs = 1; } -#define MPI_Comm_rank(comm, myproc) { *myproc = 0; } +#define MPI_Comm_size(comm, nprocs) {(void)comm; *nprocs = 1; } +#define MPI_Comm_rank(comm, myproc) {(void)comm; *myproc = 0; } #define MPI_Finalize() #define MPI_COMM_WORLD (0) #define MPI_COMM_SELF (1)