View Issue Details

IDProjectCategoryView StatusLast Update
0033032Open CASCADEOCCT:Samplespublic2023-03-19 22:34
ReportersmoskvinAssigned Toazv 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version7.7.0Fixed in Version7.7.0 
Summary0033032: Samples - eliminate GCC compiler warnings -Wmisleading-indentation and -Wcatch-value on Ubuntu 20.04
Description
../Interface/src/Translate.cxx: In member function 'virtual opencascade::handle<TopTools_HSequenceOfShape> Translate::importModel(int, const QString&)':

../Interface/src/Translate.cxx:224:15: warning: catching polymorphic type 'class Standard_Failure' by value [-Wcatch-value=]
  224 |     } catch ( Standard_Failure ) {
      |               ^~~~~~~~~~~~~~~~
../Interface/src/Translate.cxx: In member function 'virtual bool Translate::exportModel(int, const QString&, const opencascade::handle<TopTools_HSequenceOfShape>&)':

../Interface/src/Translate.cxx:259:15: warning: catching polymorphic type 'class Standard_Failure' by value [-Wcatch-value=]
  259 |     } catch ( Standard_Failure ) {
      |               ^~~~~~~~~~~~~~~~
../Interface/src/Translate.cxx: In member function 'bool Translate::exportSTL(const QString&, const opencascade::handle<TopTools_HSequenceOfShape>&)':

../Interface/src/Translate.cxx:528:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
  528 |     if ( shapes.IsNull() || shapes->IsEmpty() )
      |     ^~
../Interface/src/Translate.cxx:531:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
  531 |  TopoDS_Compound res;
      |  ^~~~~~~~~~~~~~~
../Interface/src/Translate.cxx: In member function 'bool Translate::exportVRML(const QString&, const opencascade::handle<TopTools_HSequenceOfShape>&)':

../Interface/src/Translate.cxx:557:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
  557 |     if ( shapes.IsNull() || shapes->IsEmpty() )
      |     ^~
../Interface/src/Translate.cxx:560:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
  560 |  TopoDS_Compound res;
      |  ^~~~~~~~~~~~~~~

RCC: Warning: No resources in 'release/qmake_qmake_qm_files.qrc'.

RCC: Warning: No resources in 'debug/qmake_qmake_qm_files.qrc'.
make -f Makefile.Release
Steps To ReproduceN/A
TagsNo tags attached.
Test case numberN/A

Relationships

related to 0030611 closedkgv Coding Rules - eliminate GCC compiler warnings -Wcatch-value 
related to 0028643 closedbugmaster Coding rules - eliminate GCC compiler warnings -Wmisleading-indentation 
related to 0032889 newbugmaster Configuration - Ubuntu 20.04 gcc 10 bugs 

Activities

git

2022-06-29 17:32

administrator   ~0109397

Branch CR33032 has been created by azv.

SHA-1: f982ca5ec6f57471b39af3ea92f32a8eb8132028


Detailed log of new commits:

Author: azv
Date: Wed Jun 29 17:32:17 2022 +0300

    0033032: Samples - Warning on Ubuntu 20.04
    
    Fix warnings:
    * catching polymorphic type 'class Standard_Failure' by value [-Wcatch-value=]
    * this 'if' clause does not guard... [-Wmisleading-indentation]

git

2022-07-06 09:59

administrator   ~0109591

Branch CR33032 has been updated forcibly by azv.

SHA-1: 0e68fe87807b5fd0852ebd4d86129123b63b7957

azv

2022-07-06 11:46

administrator   ~0109606

Please, check compilation warnings on OCCT branch CR33032.

git

2022-11-02 13:53

administrator   ~0111869

Branch CR33032 has been deleted by mnt.

SHA-1: 0e68fe87807b5fd0852ebd4d86129123b63b7957

Related Changesets

occt: master aaacd835

2022-06-29 17:32:17

azv


Committer: smoskvin Details Diff
0033032: Samples - Warning on Ubuntu 20.04

Fix warnings:
* catching polymorphic type 'class Standard_Failure' by value [-Wcatch-value=]
* this 'if' clause does not guard... [-Wmisleading-indentation]
Affected Issues
0033032
mod - samples/qt/Interface/src/Translate.cxx Diff File

Issue History

Date Modified Username Field Change
2022-06-27 14:32 smoskvin New Issue
2022-06-27 14:32 smoskvin Assigned To => azv
2022-06-27 14:46 smoskvin Relationship added related to 0032889
2022-06-29 17:32 git Note Added: 0109397
2022-06-30 09:52 kgv Relationship added related to 0030611
2022-06-30 09:52 kgv Relationship added related to 0028643
2022-06-30 09:53 kgv Description Updated
2022-06-30 09:53 kgv Steps to Reproduce Updated
2022-06-30 09:53 kgv Test case number => N/A
2022-06-30 09:54 kgv Summary Samples - Warning on Ubuntu 20.04 => Samples - eliminate GCC compiler warnings -Wmisleading-indentation and -Wcatch-value on Ubuntu 20.04
2022-07-06 09:59 git Note Added: 0109591
2022-07-06 11:46 azv Assigned To azv => smoskvin
2022-07-06 11:46 azv Status new => resolved
2022-07-06 11:46 azv Note Added: 0109606
2022-11-02 13:41 smoskvin Assigned To smoskvin => bugmaster
2022-11-02 13:41 smoskvin Status resolved => reviewed
2022-11-02 13:41 smoskvin Status reviewed => tested
2022-11-02 13:46 smoskvin Changeset attached => occt master aaacd835
2022-11-02 13:46 azv Assigned To bugmaster => azv
2022-11-02 13:46 azv Status tested => verified
2022-11-02 13:46 azv Resolution open => fixed
2022-11-02 13:53 git Note Added: 0111869
2023-03-19 22:34 vglukhik Status verified => closed
2023-03-19 22:34 vglukhik Fixed in Version => 7.7.0