1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0026781: Coding rules - eliminate GCC warning -Wunused-result

Check return code of fgets() and system() within FSD_BinaryFile::ReadChar(),
IFSelect_SessionFile::ReadFile(), IFSelect_SessionPilot::ReadScript(),
OSD_File::Print(), OSD_Process::Spawn(), RWStl::ReadAscii(), iges_lire().
This commit is contained in:
rkv
2015-10-28 10:13:28 +03:00
committed by bugmaster
parent 71958f7db2
commit 9816003815
8 changed files with 42 additions and 21 deletions

View File

@@ -495,7 +495,8 @@ Handle(StlMesh_Mesh) RWStl::ReadAscii (const OSD_Path& thePath,
gp_XYZ aN (Atof(x), Atof(y), Atof(z));
// skip the keywords "outer loop"
fscanf(file,"%*s %*s");
if (fscanf(file,"%*s %*s") < 0)
break;
// reading vertex
if (3 != fscanf(file,"%*s %80s %80s %80s\n", x, y, z))
@@ -516,10 +517,12 @@ Handle(StlMesh_Mesh) RWStl::ReadAscii (const OSD_Path& thePath,
ReadMesh->AddTriangle (i1, i2, i3, aN.X(), aN.Y(), aN.Z());
// skip the keywords "endloop"
fscanf(file,"%*s");
if (fscanf(file,"%*s") < 0)
break;
// skip the keywords "endfacet"
fscanf(file,"%*s");
if (fscanf(file,"%*s") < 0)
break;
// update progress only per 1k triangles
if (++iTri % IND_THRESHOLD == 0)