diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile_impl.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile_impl.h index e2465085d5b..d6bd218a2ac 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile_impl.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile_impl.h @@ -196,7 +196,9 @@ void Edge_profile::Extract_triangles_and_link( VertexIdxMap const& verte if ( v2 != mV1 ) { mLink.push_back(v2) ; - CGAL_assertion_code( bool lInserted = ) lCollected.insert(vertex_idx[v2]).second ; + CGAL_assertion_code( bool lInserted = ) + lCollected.insert(vertex_idx[v2]) + CGAL_assertion_code( .second ) ; CGAL_assertion(lInserted); } diff --git a/Surface_mesher/demo/Surface_mesher/File_XT.h b/Surface_mesher/demo/Surface_mesher/File_XT.h index fd8fb91872e..1c225c68f27 100644 --- a/Surface_mesher/demo/Surface_mesher/File_XT.h +++ b/Surface_mesher/demo/Surface_mesher/File_XT.h @@ -102,7 +102,9 @@ int lire_longueur_trace(const char * nomfich, long * long_trace) if ( (fin=fopen(nomfich,"rw"))!=NULL ) { fseek(fin,4,0); - fread(long_trace,4,1,fin); + if (fread(long_trace,4,1,fin) != 1) { + flag = -1; + } permuteLong((char *)long_trace); fclose(fin); } @@ -119,7 +121,9 @@ int lire_nb_trace(const char * nomfich, long * nb_trace) if ( (fin=fopen(nomfich,"rw"))!=NULL ) { fseek(fin,8,0); - fread(nb_trace,4,1,fin); + if (fread(nb_trace,4,1,fin) != 1) { + flag = -1; + } permuteLong((char *)nb_trace); fclose(fin); } @@ -136,7 +140,9 @@ int lire_nb_plan(const char * nomfich, long * nb_plan) if ( (fin=fopen(nomfich,"rw"))!=NULL ) { fseek(fin,12,0); - fread(nb_plan,4,1,fin); + if (fread(nb_plan,4,1,fin) != 1) { + flag = -1; + } permuteLong((char *)nb_plan); fclose(fin); } @@ -154,7 +160,9 @@ int lire_nb_octet(const char * nomfich, long * nb_octet) if ( (fin=fopen(nomfich,"rw"))!=NULL ) { fseek(fin,36,0); - fread(nb_octet,4,1,fin); + if (fread(nb_octet,4,1,fin) != 1) { + flag = -1; + } permuteLong((char *)nb_octet); fclose(fin); } @@ -172,7 +180,9 @@ int lire_longueur_entete(const char * nomfich, long * long_entete) if ( (fin=fopen(nomfich,"rw"))!=NULL ) { fseek(fin,72,0); - fread(long_entete,4,1,fin); + if (fread(long_entete,4,1,fin) != 1) { + flag = -1; + } permuteLong((char *)long_entete); fclose(fin); }