From: ageay Date: Mon, 20 Sep 2010 08:15:05 +0000 (+0000) Subject: Suppression of warnings. X-Git-Tag: V5_1_main_FINAL~36 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=db4230e3b9c6516c436036a89dad59ed8b739dc8;p=tools%2Fmedcoupling.git Suppression of warnings. --- diff --git a/src/INTERP_KERNEL/DirectedBoundingBox.cxx b/src/INTERP_KERNEL/DirectedBoundingBox.cxx index 4b88bc4b3..b59f78db6 100644 --- a/src/INTERP_KERNEL/DirectedBoundingBox.cxx +++ b/src/INTERP_KERNEL/DirectedBoundingBox.cxx @@ -20,7 +20,6 @@ // Created : Mon Apr 12 14:41:22 2010 // Author : Edward AGAPOV (eap) - #include "DirectedBoundingBox.hxx" #include "InterpolationUtils.hxx" @@ -237,9 +236,9 @@ namespace INTERP_KERNEL if ( dim > 1 ) { for ( coord = pts; coord < coordEnd; ) - for ( int i = 0; i < dim; ++i ) + for ( int i = 0; i < (int)dim; ++i ) gc[i] += *coord++; - for ( int j = 0; j < dim; ++j ) + for ( int j = 0; j < (int)dim; ++j ) gc[j] /= numPts; } @@ -309,9 +308,9 @@ namespace INTERP_KERNEL if ( dim > 1 ) { for ( unsigned i = 0; i < numPts; ++i ) - for ( int j = 0; j < dim; ++j ) + for ( int j = 0; j < (int)dim; ++j ) gc[j] += pts[i][j]; - for ( int j = 0; j < dim; ++j ) + for ( int j = 0; j < (int)dim; ++j ) gc[j] /= numPts; } @@ -569,7 +568,7 @@ namespace INTERP_KERNEL const double* minmax) const { int iC, nbCorners = 1; - for ( int i=0;i<_dim;++i ) nbCorners *= 2; + for ( int i=0;i<(int)_dim;++i ) nbCorners *= 2; corners.resize( nbCorners * _dim ); // each coordinate is filled with either min or max, nbSwap is number of corners // after which min and max swap @@ -662,7 +661,7 @@ namespace INTERP_KERNEL for ( int iC = 0, nC = cornersThis.size()/_dim; iC < nC; ++iC) { fromLocalCS( &cornersThis[iC*_dim], globCorner ); - for ( int i = 0; i < _dim; ++i ) + for ( int i = 0; i < (int)_dim; ++i ) { if ( globCorner[i] < mmBox._minmax[i*2] ) mmBox._minmax[i*2] = globCorner[i]; if ( globCorner[i] > mmBox._minmax[i*2+1] ) mmBox._minmax[i*2+1] = globCorner[i]; @@ -715,7 +714,7 @@ namespace INTERP_KERNEL data.insert( data.end(), &_axes[0], &_axes[0] + _axes.size()); data.insert( data.end(), &_minmax[0], &_minmax[0] + _minmax.size()); } - if ( data.size() < dataSize( _dim )) + if ( data.size() < (unsigned)dataSize( _dim )) data.resize( dataSize( _dim ), 0 ); return data; } diff --git a/src/INTERP_KERNEL/DirectedBoundingBox.hxx b/src/INTERP_KERNEL/DirectedBoundingBox.hxx index 93874acdb..344f65909 100644 --- a/src/INTERP_KERNEL/DirectedBoundingBox.hxx +++ b/src/INTERP_KERNEL/DirectedBoundingBox.hxx @@ -16,8 +16,9 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#ifndef __DirectedBoundingBox_HXX__ -#define __DirectedBoundingBox_HXX__ + +#ifndef __DIRECTEDBOUNDINGBOX_HXX__ +#define __DIRECTEDBOUNDINGBOX_HXX__ #include "INTERPKERNELDefines.hxx" @@ -92,7 +93,7 @@ namespace INTERP_KERNEL inline bool DirectedBoundingBox::isLocalOut(const double* pLoc) const { - for ( int i = 0; i < _dim; ++i ) + for ( int i = 0; i < (int)_dim; ++i ) if ( pLoc[i] < _minmax[i*2] || pLoc[i] > _minmax[i*2+1] ) return true; return false; @@ -106,10 +107,10 @@ namespace INTERP_KERNEL inline void DirectedBoundingBox::addPointToBox(const double* coord) { - for ( int i = 0; i < _dim; ++i ) + for ( int i = 0; i < (int)_dim; ++i ) { double c = 0; - for ( int j = 0; j < _dim; ++j ) c += coord[j]*_axes[i*_dim+j]; + for ( int j = 0; j < (int)_dim; ++j ) c += coord[j]*_axes[i*_dim+j]; if ( c < _minmax[i*2] ) _minmax[i*2] = c; if ( c > _minmax[i*2+1] ) _minmax[i*2+1] = c; } diff --git a/src/INTERP_KERNEL/InterpolationUtils.hxx b/src/INTERP_KERNEL/InterpolationUtils.hxx index 2d5ca00df..e96f3fc1b 100644 --- a/src/INTERP_KERNEL/InterpolationUtils.hxx +++ b/src/INTERP_KERNEL/InterpolationUtils.hxx @@ -221,13 +221,13 @@ namespace INTERP_KERNEL // make upper triangular matrix (forward elimination) int iR[nbRow];// = { 0, 1, 2 }; - for ( int i = 0; i < nbRow; ++i ) iR[i] = i; + for ( int i = 0; i < (int) nbRow; ++i ) iR[i] = i; - for ( int i = 0; i < nbRow-1; ++i ) // nullify nbRow-1 rows + for ( int i = 0; i < (int)(nbRow-1); ++i ) // nullify nbRow-1 rows { // swap rows to have max value of i-th column in i-th row double max = std::fabs( M[ iR[i] ][i] ); - for ( int r = i+1; r < nbRow; ++r ) { + for ( int r = i+1; r < (int)nbRow; ++r ) { double m = std::fabs( M[ iR[r] ][i] ); if ( m > max ) { max = m; @@ -240,7 +240,7 @@ namespace INTERP_KERNEL } // make 0 below M[i][i] (actually we do not modify i-th column) double* tUpRow = M[ iR[i] ]; - for ( int r = i+1; r < nbRow; ++r ) { + for ( int r = i+1; r < (int)nbRow; ++r ) { double* mRow = M[ iR[r] ]; double coef = mRow[ i ] / tUpRow[ i ]; for ( int c = i+1; c < nbCol; ++c ) diff --git a/src/INTERP_KERNEL/VolSurfFormulae.hxx b/src/INTERP_KERNEL/VolSurfFormulae.hxx index 112638bde..e9bdd855d 100644 --- a/src/INTERP_KERNEL/VolSurfFormulae.hxx +++ b/src/INTERP_KERNEL/VolSurfFormulae.hxx @@ -450,7 +450,7 @@ namespace INTERP_KERNEL * @param res must be of size at least 3 to store the result. */ template - inline double areaVectorOfPolygon(const ConnType *connec, int lgth, const double *coords, double *res) + inline void areaVectorOfPolygon(const ConnType *connec, int lgth, const double *coords, double *res) { res[0]=0.; res[1]=0.; res[2]=0.; for(int ptId=0;ptId