Skip to content
Snippets Groups Projects
Commit ad15fa29 authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

WRG: hide unused parameter from mpi.h using GCC pragma

parent d59c0342
No related branches found
No related tags found
No related merge requests found
...@@ -24,7 +24,15 @@ ...@@ -24,7 +24,15 @@
#include <string> #include <string>
#include <cassert> #include <cassert>
#if defined(__GNUC__) || defined(__clang__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunused-parameter"
#include <mpi.h> #include <mpi.h>
# pragma GCC diagnostic pop
#else
#include <mpi.h>
#endif
/** /**
* Call the MPI routine MPIFunc with arguments Args (surrounded by * Call the MPI routine MPIFunc with arguments Args (surrounded by
...@@ -117,13 +125,13 @@ void MPIConfig::Init(int& argc, char** &argv, bool abortOnException) { ...@@ -117,13 +125,13 @@ void MPIConfig::Init(int& argc, char** &argv, bool abortOnException) {
logError("Negative MPI rank"); logError("Negative MPI rank");
abort(EXIT_FAILURE); abort(EXIT_FAILURE);
} }
m_MyRank = static_cast<unsigned int>(irank); m_MyRank = static_cast<unsigned int>(irank);
// Get MPI NbProocs // Get MPI NbProocs
int inbprocs=0; int inbprocs=0;
OTB_MPI_CHECK_RESULT(MPI_Comm_size, (MPI_COMM_WORLD , &inbprocs)); OTB_MPI_CHECK_RESULT(MPI_Comm_size, (MPI_COMM_WORLD , &inbprocs));
if(inbprocs<1) if(inbprocs<1)
...@@ -160,4 +168,3 @@ void MPIConfig::logInfo(const std::string message) { ...@@ -160,4 +168,3 @@ void MPIConfig::logInfo(const std::string message) {
} }
} // End namespace otb } // End namespace otb
...@@ -56,7 +56,15 @@ ...@@ -56,7 +56,15 @@
// SPTW // SPTW
#include <algorithm> #include <algorithm>
#include <vector> #include <vector>
#if defined(__GNUC__) || defined(__clang__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunused-parameter"
#include "sptw.h"
# pragma GCC diagnostic pop
#else
#include "sptw.h" #include "sptw.h"
#endif
// GDAL-OTB datatype brigde // GDAL-OTB datatype brigde
#include "otbGdalDataTypeBridge.h" #include "otbGdalDataTypeBridge.h"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment