View Issue Details

IDProjectCategoryView StatusLast Update
0026710Open CASCADEOCCT:Codingpublic2016-04-20 15:48
Reporterkgv Assigned Tokgv  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformLinuxOSDebian 6.0 
Product Version6.9.0 
Target Version7.0.0Fixed in Version7.0.0 
Summary0026710: Coding rules - eliminate GCC warning -Wunused-result in Voxel_Reader.cxx
DescriptionThe following warnings should be eliminated:
/occt/src/Voxel/Voxel_Reader.cxx: In member function ‘Standard_Boolean Voxel_Reader::Read(const TCollection_ExtendedString&)’:
/occt/src/Voxel/Voxel_Reader.cxx:43:54: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
   fscanf(f, "%8s %8s %8s\n", svoxels, sformat, stype);
/occt/src/Voxel/Voxel_Reader.cxx: In member function ‘Standard_Boolean Voxel_Reader::ReadBoolAsciiVoxels(const TCollection_ExtendedString&)’:
/occt/src/Voxel/Voxel_Reader.cxx:151:21: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fgets(line, 64, f);
/occt/src/Voxel/Voxel_Reader.cxx:187:25: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
       fgets(line, 64, f);
/occt/src/Voxel/Voxel_Reader.cxx: In member function ‘Standard_Boolean Voxel_Reader::ReadColorAsciiVoxels(const TCollection_ExtendedString&)’:
/occt/src/Voxel/Voxel_Reader.cxx:228:21: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fgets(line, 64, f);
/occt/src/Voxel/Voxel_Reader.cxx:264:25: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
       fgets(line, 64, f);
/occt/src/Voxel/Voxel_Reader.cxx: In member function ‘Standard_Boolean Voxel_Reader::ReadFloatAsciiVoxels(const TCollection_ExtendedString&)’:
/occt/src/Voxel/Voxel_Reader.cxx:305:21: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fgets(line, 64, f);
/occt/src/Voxel/Voxel_Reader.cxx:342:25: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
       fgets(line, 64, f);
/occt/src/Voxel/Voxel_Reader.cxx: In member function ‘Standard_Boolean Voxel_Reader::ReadBoolBinaryVoxels(const TCollection_ExtendedString&)’:
/occt/src/Voxel/Voxel_Reader.cxx:384:21: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fgets(line, 64, f);
/occt/src/Voxel/Voxel_Reader.cxx:389:41: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&x, sizeof(Standard_Real), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:390:41: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&y, sizeof(Standard_Real), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:391:41: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&z, sizeof(Standard_Real), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:392:44: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&xlen, sizeof(Standard_Real), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:393:44: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&ylen, sizeof(Standard_Real), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:394:44: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&zlen, sizeof(Standard_Real), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:395:46: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&nbx, sizeof(Standard_Integer), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:396:46: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&nby, sizeof(Standard_Integer), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:397:46: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&nbz, sizeof(Standard_Integer), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:412:49: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
       fread(&i1, sizeof(Standard_Integer), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:413:49: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
       fread(&i2, sizeof(Standard_Integer), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:414:49: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
       fread(&value, sizeof(Standard_Byte), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx: In member function ‘Standard_Boolean Voxel_Reader::ReadColorBinaryVoxels(const TCollection_ExtendedString&)’:
/occt/src/Voxel/Voxel_Reader.cxx:439:21: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fgets(line, 64, f);
/occt/src/Voxel/Voxel_Reader.cxx:444:41: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&x, sizeof(Standard_Real), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:445:41: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&y, sizeof(Standard_Real), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:446:41: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&z, sizeof(Standard_Real), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:447:44: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&xlen, sizeof(Standard_Real), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:448:44: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&ylen, sizeof(Standard_Real), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:449:44: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&zlen, sizeof(Standard_Real), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:450:46: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&nbx, sizeof(Standard_Integer), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:451:46: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&nby, sizeof(Standard_Integer), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:452:46: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&nbz, sizeof(Standard_Integer), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:467:49: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
       fread(&i1, sizeof(Standard_Integer), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:468:49: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
       fread(&i2, sizeof(Standard_Integer), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:469:49: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
       fread(&value, sizeof(Standard_Byte), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx: In member function ‘Standard_Boolean Voxel_Reader::ReadFloatBinaryVoxels(const TCollection_ExtendedString&)’:
/occt/src/Voxel/Voxel_Reader.cxx:494:21: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fgets(line, 64, f);
/occt/src/Voxel/Voxel_Reader.cxx:499:41: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&x, sizeof(Standard_Real), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:500:41: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&y, sizeof(Standard_Real), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:501:41: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&z, sizeof(Standard_Real), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:502:44: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&xlen, sizeof(Standard_Real), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:503:44: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&ylen, sizeof(Standard_Real), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:504:44: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&zlen, sizeof(Standard_Real), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:505:46: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&nbx, sizeof(Standard_Integer), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:506:46: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&nby, sizeof(Standard_Integer), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:507:46: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&nbz, sizeof(Standard_Integer), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:523:49: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
       fread(&i1, sizeof(Standard_Integer), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:524:49: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
       fread(&i2, sizeof(Standard_Integer), 1, f);
/occt/src/Voxel/Voxel_Reader.cxx:525:54: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
       fread(&value, sizeof(Standard_ShortReal), 1, f);

Steps To ReproduceN/A
TagsNo tags attached.
Test case numberNot needed

Relationships

child of 0026781 closedbugmaster Coding rules - eliminate GCC warning -Wunused-result 

Activities

git

2015-09-19 11:14

administrator   ~0045928

Branch CR26710 has been created by kgv.

SHA-1: 6f510b70f195b36c95db03e8773a1fd92451c7fa


Detailed log of new commits:

Author: kgv
Date: Sat Sep 19 11:14:01 2015 +0300

    0026710: Coding rules - eliminate GCC warning -Wunused-result in Voxel_Reader.cxx

kgv

2015-09-19 11:14

developer   ~0045929

Patch is ready for review.

abv

2015-09-19 12:12

manager   ~0045930

No remarks, please test

apv

2015-09-22 13:28

tester   ~0045997

Dear BugMaster,

Branch CR26710 from occt git-repository (and master from products git-repository) was compiled on Linux and Windows platforms and tested.
SHA-1: 6f510b70f195b36c95db03e8773a1fd92451c7fa

Number of compiler warnings:
occt component:
   Linux: 15 (15 on master)
   Windows: 0 (0 on master)
products component:
   Linux: 39 (39 on master)
   Windows: 0 (0 on master)

Regressions/Differences:
Not detected

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 91999493 / 92153882 [-0.17%]
Total CPU difference: 18894.349999998904 / 18924.459999998988 [-0.16%]

Testing on Windows:
Total MEMORY difference: 56859736 / 56869470 [-0.02%]
Total CPU difference: 17486.308090999275 / 17117.02252379913 [+2.16%]

git

2015-10-16 16:14

administrator   ~0046890

Branch CR26710 has been deleted by kgv.

SHA-1: 6f510b70f195b36c95db03e8773a1fd92451c7fa

Related Changesets

occt: master fca1d27c

2015-09-19 08:14:01

kgv

Details Diff
0026710: Coding rules - eliminate GCC warning -Wunused-result in Voxel_Reader.cxx Affected Issues
0026710
mod - src/Voxel/Voxel_Reader.cxx Diff File

Issue History

Date Modified Username Field Change
2015-09-19 11:11 kgv New Issue
2015-09-19 11:11 kgv Assigned To => kgv
2015-09-19 11:14 git Note Added: 0045928
2015-09-19 11:14 kgv Note Added: 0045929
2015-09-19 11:14 kgv Assigned To kgv => abv
2015-09-19 11:14 kgv Status new => resolved
2015-09-19 12:12 abv Note Added: 0045930
2015-09-19 12:12 abv Assigned To abv => bugmaster
2015-09-19 12:12 abv Status resolved => reviewed
2015-09-21 17:03 apv Assigned To bugmaster => apv
2015-09-22 13:26 apv Test case number => Not needed
2015-09-22 13:28 apv Note Added: 0045997
2015-09-22 13:28 apv Assigned To apv => bugmaster
2015-09-22 13:28 apv Status reviewed => tested
2015-09-28 12:58 kgv Changeset attached => occt master fca1d27c
2015-09-28 12:58 kgv Assigned To bugmaster => kgv
2015-09-28 12:58 kgv Status tested => verified
2015-09-28 12:58 kgv Resolution open => fixed
2015-10-16 10:08 kgv Relationship added related to 0026781
2015-10-16 10:08 kgv Relationship replaced child of 0026781
2015-10-16 16:14 git Note Added: 0046890
2016-04-20 15:44 aiv Fixed in Version => 7.0.0
2016-04-20 15:48 aiv Status verified => closed