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

WRG: fix -WSign-compare thrown by GCC 5.

parent 8150196b
No related branches found
No related tags found
No related merge requests found
......@@ -124,7 +124,7 @@ BinaryImageMinimalBoundingRegionCalculator<TInputImage>
typename InputImageType::SizeType size;
typename InputImageType::IndexType index;
for (int i = 0; i < InputImageType::ImageDimension; ++i)
for (unsigned int i = 0; i < InputImageType::ImageDimension; ++i)
{
size[i] = max[i] - min[i] + 1;
index[i] = min[i];
......
......@@ -210,7 +210,7 @@ MorphologicalPyramidAnalysisFilter<TInputImage, TOutputImage, TMorphoFilter>
// New Size
size = morphoFilter->GetOutput()->GetLargestPossibleRegion().GetSize();
for (int j = 0; j < InputImageType::ImageDimension; ++j)
for (unsigned int j = 0; j < InputImageType::ImageDimension; ++j)
{
sizeTmp = size[j];
// As we knwow that our values will always be positive ones, we can simulate round by ceil(value+0.5)
......
......@@ -34,7 +34,7 @@ template <class TInputImage, class TOutputImage>
Resampler<TInputImage, TOutputImage>
::Resampler()
{
for (int i = 0; i < InputImageType::ImageDimension; ++i)
for (unsigned int i = 0; i < InputImageType::ImageDimension; ++i)
{
m_Size[i] = 0;
}
......
......@@ -18,7 +18,14 @@
#ifndef __otbImageFileReader_h
#define __otbImageFileReader_h
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#include "itkImageSource.h"
#pragma GCC diagnostic pop
#else
#include "itkImageSource.h"
#endif
#include "otbImageIOBase.h"
#include "itkExceptionObject.h"
#include "itkImageRegion.h"
......@@ -141,13 +148,13 @@ public:
/** Get the resolution information from the file */
bool GetResolutionsInfo( std::vector<unsigned int>& res,
std::vector<std::string>& desc);
/** Get the number of overviews available into the file specified
* Returns: overview count, zero if none. */
unsigned int GetOverviewsCount();
/** Get description about overviews available into the file specified
unsigned int GetOverviewsCount();
/** Get description about overviews available into the file specified
* Returns: overview info, empty if none.*/
std::vector<std::string> GetOverviewsInfo();
......
......@@ -84,13 +84,13 @@ SOMWithMissingValue<TListSample, TMap, TSOMLearningBehaviorFunctor, TSOMNeighbor
// The neighborhood is of elliptic shape
double theDistance = itk::NumericTraits<double>::Zero;
for (int j = 0; j < MapType::ImageDimension; ++j)
for (unsigned int j = 0; j < MapType::ImageDimension; ++j)
theDistance += pow(static_cast<double>(offset[j]), 2.0)
/ pow(static_cast<double>(radius[j]), 2.0);
if (theDistance <= 1.0)
{
for (int j = 0; j < MapType::ImageDimension; ++j)
for (unsigned int j = 0; j < MapType::ImageDimension; ++j)
{
int pos = offset[j] + position[j];
positionToUpdate[j] = (pos >= 0) ?
......
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