From d58c3341a74580657bcf4d19dfb33436a99cdbe4 Mon Sep 17 00:00:00 2001 From: ageay Date: Tue, 24 Jan 2012 11:40:32 +0000 Subject: [PATCH] Warning hunting. --- src/INTERP_KERNEL/BBTree.txx | 4 +-- .../InterpKernelGeo2DComposedEdge.hxx | 6 ++-- src/INTERP_KERNEL/InterpolationUtils.hxx | 12 ++++---- src/INTERP_KERNEL/PlanarIntersector.txx | 4 +-- src/INTERP_KERNEL/VolSurfFormulae.hxx | 28 +++++++++---------- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/INTERP_KERNEL/BBTree.txx b/src/INTERP_KERNEL/BBTree.txx index f77c34904..7b4616d24 100644 --- a/src/INTERP_KERNEL/BBTree.txx +++ b/src/INTERP_KERNEL/BBTree.txx @@ -129,11 +129,11 @@ public: tmp=0; if(!new_elems_left.empty()) tmp=&(new_elems_left[0]); - _left=new BBTree(bbs, tmp, level+1, new_elems_left.size(),_epsilon); + _left=new BBTree(bbs, tmp, level+1, (int)new_elems_left.size(),_epsilon); tmp=0; if(!new_elems_right.empty()) tmp=&(new_elems_right[0]); - _right=new BBTree(bbs, tmp, level+1, new_elems_right.size(),_epsilon); + _right=new BBTree(bbs, tmp, level+1, (int)new_elems_right.size(),_epsilon); } diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DComposedEdge.hxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DComposedEdge.hxx index 86209c7d5..4f0a2bac1 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DComposedEdge.hxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DComposedEdge.hxx @@ -41,11 +41,11 @@ namespace INTERP_KERNEL public: ComposedEdge() { } ComposedEdge(const ComposedEdge& other); - ComposedEdge(int size):_sub_edges(size) { } + ComposedEdge(int sz):_sub_edges(sz) { } static void Delete(ComposedEdge *pt) { delete pt; } static void SoftDelete(ComposedEdge *pt) { pt->_sub_edges.clear(); delete pt; } void reverse(); - int recursiveSize() const { return _sub_edges.size(); } + int recursiveSize() const { return (int)_sub_edges.size(); } void initLocations() const; ComposedEdge *clone() const; bool isNodeIn(Node *n) const; @@ -76,7 +76,7 @@ namespace INTERP_KERNEL void pushBack(Edge *edge, bool direction=true); void pushBack(ElementaryEdge *elem); void pushBack(ComposedEdge *elem); - int size() const { return _sub_edges.size(); } + int size() const { return (int)_sub_edges.size(); } ElementaryEdge *operator[](int i) const; Node *getEndNode() const; Node *getStartNode() const; diff --git a/src/INTERP_KERNEL/InterpolationUtils.hxx b/src/INTERP_KERNEL/InterpolationUtils.hxx index b390d445a..26b28a336 100644 --- a/src/INTERP_KERNEL/InterpolationUtils.hxx +++ b/src/INTERP_KERNEL/InterpolationUtils.hxx @@ -198,8 +198,8 @@ namespace INTERP_KERNEL x=x+V[2*i]; y=y+V[2*i+1]; } - double A=2*x/taille; - double B=2*y/taille; + double A=2*x/((double)taille); + double B=2*y/((double)taille); Bary.push_back(A);//taille vecteur=2*nb de points. Bary.push_back(B); @@ -725,7 +725,7 @@ namespace INTERP_KERNEL inline std::vector reconstruct_polygon(const std::vector& V) { - int taille=V.size(); + std::size_t taille=V.size(); //VB : why 6 ? @@ -740,7 +740,7 @@ namespace INTERP_KERNEL COS[0]=1.0; SIN[0]=0.0; //angle[0]=0.0; - for(int i=0; i Trigo=calcul_cos_et_sin(&Bary[0],&V[0],&V[2*(i+1)]); COS[i+1]=Trigo[0]; @@ -756,7 +756,7 @@ namespace INTERP_KERNEL Pt_ordonne.reserve(taille); // std::multimap Ordre; std::multimap,int, AngleLess> CosSin; - for(int i=0;i inline - void crossprod<1>( const double * A, const double * B, const double * C, double * V) + void crossprod<1>( const double * /*A*/, const double * /*B*/, const double * /*C*/, double * /*V*/) { // just to be able to compile } diff --git a/src/INTERP_KERNEL/PlanarIntersector.txx b/src/INTERP_KERNEL/PlanarIntersector.txx index bdb10f9ac..a739f9f60 100644 --- a/src/INTERP_KERNEL/PlanarIntersector.txx +++ b/src/INTERP_KERNEL/PlanarIntersector.txx @@ -346,10 +346,10 @@ namespace INTERP_KERNEL if(!same_orientation) for(int idim =0; idim< SPACEDIM; idim++) normal_A[idim] *=-1; - double normB= sqrt(dotprod(normal_B,normal_B)); + double normBB= sqrt(dotprod(normal_B,normal_B)); for(int idim =0; idim< SPACEDIM; idim++) - linear_comb[idim] = median_plane*normal_A[idim]/normA + (1-median_plane)*normal_B[idim]/normB; + linear_comb[idim] = median_plane*normal_A[idim]/normA + (1-median_plane)*normal_B[idim]/normBB; double norm= sqrt(dotprod(linear_comb,linear_comb)); //Necessarily: norm>epsilon, no need to check diff --git a/src/INTERP_KERNEL/VolSurfFormulae.hxx b/src/INTERP_KERNEL/VolSurfFormulae.hxx index b6047559b..ac88c255d 100644 --- a/src/INTERP_KERNEL/VolSurfFormulae.hxx +++ b/src/INTERP_KERNEL/VolSurfFormulae.hxx @@ -421,15 +421,15 @@ namespace INTERP_KERNEL template inline double calculateVolumeForPolyh2(const ConnType *connec, int lgth, const double *coords) { - int nbOfFaces=std::count(connec,connec+lgth,-1)+1; + std::size_t nbOfFaces=std::count(connec,connec+lgth,-1)+1; double volume=0.; const int *work=connec; - for(int iFace=0;iFace::coo2C(work[ptId]); const double *pti1=coords+3*OTT::coo2C(work[(ptId+1)%nbOfNodesOfCurFace]); @@ -472,13 +472,13 @@ namespace INTERP_KERNEL template inline void barycenterOfPolyhedron(const ConnType *connec, int lgth, const double *coords, double *res) { - int nbOfFaces=std::count(connec,connec+lgth,-1)+1; + std::size_t nbOfFaces=std::count(connec,connec+lgth,-1)+1; res[0]=0.; res[1]=0.; res[2]=0.; const int *work=connec; - for(int i=0;i(work,nbOfNodesOfCurFace,coords,normal); @@ -576,37 +576,37 @@ namespace INTERP_KERNEL } template<> - inline void calculateBarycenter<2,0>(const double **pts, double *bary) + inline void calculateBarycenter<2,0>(const double **/*pts*/, double */*bary*/) { } template<> - inline void calculateBarycenter<3,0>(const double **pts, double *bary) + inline void calculateBarycenter<3,0>(const double **/*pts*/, double */*bary*/) { } template<> - inline void calculateBarycenter<4,0>(const double **pts, double *bary) + inline void calculateBarycenter<4,0>(const double **/*pts*/, double */*bary*/) { } template<> - inline void calculateBarycenter<5,0>(const double **pts, double *bary) + inline void calculateBarycenter<5,0>(const double **/*pts*/, double */*bary*/) { } template<> - inline void calculateBarycenter<6,0>(const double **pts, double *bary) + inline void calculateBarycenter<6,0>(const double **/*pts*/, double */*bary*/) { } template<> - inline void calculateBarycenter<7,0>(const double **pts, double *bary) + inline void calculateBarycenter<7,0>(const double **/*pts*/, double */*bary*/) { } template<> - inline void calculateBarycenter<8,0>(const double **pts, double *bary) + inline void calculateBarycenter<8,0>(const double **/*pts*/, double */*bary*/) { } -- 2.39.2