From 5aa7732cb44aa9aea8f421ffcf97c92099d9002c Mon Sep 17 00:00:00 2001 From: jmespadero Date: Thu, 11 Nov 2021 16:28:47 +0100 Subject: [PATCH] remove warnings --- .../local_optimization/tri_edge_collapse_quadric_tex.h | 8 +++----- wrap/io_trimesh/import_off.h | 1 + wrap/io_trimesh/import_vmi.h | 7 ++----- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/vcg/complex/algorithms/local_optimization/tri_edge_collapse_quadric_tex.h b/vcg/complex/algorithms/local_optimization/tri_edge_collapse_quadric_tex.h index 707196656..4b0695b48 100644 --- a/vcg/complex/algorithms/local_optimization/tri_edge_collapse_quadric_tex.h +++ b/vcg/complex/algorithms/local_optimization/tri_edge_collapse_quadric_tex.h @@ -326,8 +326,6 @@ class TriEdgeCollapseQuadricTex: public vcg::tri::TriEdgeCollapse< TriMeshType, double QuadErr = qsum.Apply(vv); //// Rescan faces and compute quality and difference between normals - int i; - double qt, MinQual = 1e100; vcg::face::VFIterator x(this->pos.V(0)); @@ -335,7 +333,7 @@ class TriEdgeCollapseQuadricTex: public vcg::tri::TriEdgeCollapse< TriMeshType, // (e.g. max angle) Mincos varia da 1 (normali coincidenti) a // -1 (normali opposte); - for(x.F() = v[0]->VFp(), x.I() = v[0]->VFi(),i=0; x.F()!=0; ++x ) // for all faces in v0 + for(x.F() = v[0]->VFp(), x.I() = v[0]->VFi(); x.F()!=0; ++x ) // for all faces in v0 if(x.F()->V(0)!=v[1] && x.F()->V(1)!=v[1] && x.F()->V(2)!=v[1] ) // skip faces with v1 { qt= QualityFace(*x.F()); @@ -347,7 +345,7 @@ class TriEdgeCollapseQuadricTex: public vcg::tri::TriEdgeCollapse< TriMeshType, assert(!math::IsNAN(ndiff)); } } - for(x.F() = v[1]->VFp(), x.I() = v[1]->VFi(),i=0; x.F()!=0; ++x ) // for all faces in v1 + for(x.F() = v[1]->VFp(), x.I() = v[1]->VFi(); x.F()!=0; ++x ) // for all faces in v1 if(x.F()->V(0)!=v[0] && x.F()->V(1)!=v[0] && x.F()->V(2)!=v[0] ) // skip faces with v0 { qt= QualityFace(*x.F()); @@ -703,7 +701,7 @@ class TriEdgeCollapseQuadricTex: public vcg::tri::TriEdgeCollapse< TriMeshType, v[0] = this->pos.V(0); v[1] = this->pos.V(1); - math::Quadric qsum3 = QH::Qd3(v[0]); + vcg::math::Quadric qsum3 = QH::Qd3(v[0]); qsum3 += QH::Qd3(v[1]); ncoords = GetTexCoords(tcoord0_1,tcoord1_1,tcoord0_2,tcoord1_2); diff --git a/wrap/io_trimesh/import_off.h b/wrap/io_trimesh/import_off.h index 80e9f3829..7a68bdad8 100644 --- a/wrap/io_trimesh/import_off.h +++ b/wrap/io_trimesh/import_off.h @@ -210,6 +210,7 @@ namespace vcg { nVertices = atoi(tokens[0].c_str()); nFaces = atoi(tokens[1].c_str()); nEdges = atoi(tokens[2].c_str()); + (void)nEdges; // dimension is the space dimension of vertices => it must be three(!) if (dimension != 3) diff --git a/wrap/io_trimesh/import_vmi.h b/wrap/io_trimesh/import_vmi.h index e08b2d31b..e338e28e5 100644 --- a/wrap/io_trimesh/import_vmi.h +++ b/wrap/io_trimesh/import_vmi.h @@ -725,19 +725,16 @@ namespace io { /* resize the vector of vertices */ m.vert.resize(vertSize); - - size_t read = 0; /* load the vertices */ if(vertSize>0){ - read=Read((void*)& m.vert[0],sizeof(VertexType),vertSize ); + Read((void*)& m.vert[0],sizeof(VertexType),vertSize ); LoadVertexOcf(F(),m.vert); } - read = 0; m.face.resize(faceSize); if(faceSize>0){ /* load the faces */ - read = Read((void*)& m.face[0],sizeof(FaceType),faceSize ); + Read((void*)& m.face[0],sizeof(FaceType),faceSize ); LoadFaceOcf(m.face); }