MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0026710Open CASCADE[OCCT] OCCT:Codingpublic2015-09-19 11:112016-04-20 15:48
Reporterkgv 
Assigned Tokgv 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformLinuxOSDebian 6.0OS Version64 bit
Product Version[OCCT] 6.9.0 
Target Version[OCCT] 7.0.0Fixed in Version[OCCT] 7.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
Attached Files

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

-  Notes
(0045928)
git (administrator)
2015-09-19 11:14

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
(0045929)
kgv (developer)
2015-09-19 11:14

Patch is ready for review.
(0045930)
abv (manager)
2015-09-19 12:12

No remarks, please test
(0045997)
apv (tester)
2015-09-22 13:28

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%]
(0046890)
git (administrator)
2015-10-16 16:14

Branch CR26710 has been deleted by kgv.

SHA-1: 6f510b70f195b36c95db03e8773a1fd92451c7fa

- Related Changesets
occt: master fca1d27c
Timestamp: 2015-09-19 08:14:01
Author: kgv
Details ] Diff ]
0026710: Coding rules - eliminate GCC warning -Wunused-result in Voxel_Reader.cxx
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


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker