Archived issue #0026613
Coding - avoid use of macros in Resource_Manager.cxx
Description
As reported in https://github.com/tpaviot/oce/issues/564#issuecomment-135169338, the preprocessor macros used in Resource_Manager.cxx can cause conflicts with other definitions when building under Windows. It is worth replacing these by enums with more specific names.
Public activity
12 archived notes
Participants are labeled by their role within this record.
Branch [archived branch] has been created by Commenter 3.
[revision removed]
Detailed log of new commits:
Author: Commenter 3
Date: Fri Aug 28 10:35:59 2015 +0300
0026613: Coding - avoid use of macros in Resource_Manager.cxx
Replace macros by enum Resource_KindOfLine.
[revision removed]
Detailed log of new commits:
Author: Commenter 3
Date: Fri Aug 28 10:35:59 2015 +0300
0026613: Coding - avoid use of macros in Resource_Manager.cxx
Replace macros by enum Resource_KindOfLine.
Patch is ready for review.
No remarks, please test
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been rebased on the current master
Dear Commenter 1,
Branch CR26613 from occt git-repository (and master from products git-repository) was compiled on Linux and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component:
Linux: 16 (15 on master)
Windows: 0 (0 on master)
products component:
Linux: 39 (39 on master)
Windows: 0 (0 on master)
There is new additional warning:
Resource_Manager.cxx:126, GNU C Compiler 4 (gcc), Priority: Normal
enumeration value 'Resource_KOL_End' not handled in switch [-Wswitch]
Regressions/Differences:
Not detected
Testing cases:
Not needed
Testing on Linux:
Total MEMORY difference: 90700835 / 91194202 [-0.54%]
Total CPU difference: 17694.139999998923 / 17164.219999999383 [+3.09%]
Testing on Windows:
Total MEMORY difference: 57033353 / 57042860 [-0.02%]
Total CPU difference: 16107.976855599065 / 16075.793849298934 [+0.20%]
Branch CR26613 from occt git-repository (and master from products git-repository) was compiled on Linux and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component:
Linux: 16 (15 on master)
Windows: 0 (0 on master)
products component:
Linux: 39 (39 on master)
Windows: 0 (0 on master)
There is new additional warning:
Resource_Manager.cxx:126, GNU C Compiler 4 (gcc), Priority: Normal
enumeration value 'Resource_KOL_End' not handled in switch [-Wswitch]
Regressions/Differences:
Not detected
Testing cases:
Not needed
Testing on Linux:
Total MEMORY difference: 90700835 / 91194202 [-0.54%]
Total CPU difference: 17694.139999998923 / 17164.219999999383 [+3.09%]
Testing on Windows:
Total MEMORY difference: 57033353 / 57042860 [-0.02%]
Total CPU difference: 16107.976855599065 / 16075.793849298934 [+0.20%]
Branch [archived branch] has been updated by Commenter 3.
[revision removed]
Detailed log of new commits:
Author: Commenter 3
Date: Wed Sep 2 16:45:45 2015 +0300
suppress gcc warning
[revision removed]
Detailed log of new commits:
Author: Commenter 3
Date: Wed Sep 2 16:45:45 2015 +0300
suppress gcc warning
Branch [archived branch] has been created by Commenter 3.
[revision removed]
Detailed log of new commits:
Author: Commenter 3
Date: Wed Sep 2 16:47:09 2015 +0300
0026613: Coding - avoid use of macros in Resource_Manager.cxx
Replace macros by enum Resource_KindOfLine.
[revision removed]
Detailed log of new commits:
Author: Commenter 3
Date: Wed Sep 2 16:47:09 2015 +0300
0026613: Coding - avoid use of macros in Resource_Manager.cxx
Replace macros by enum Resource_KindOfLine.
Dear Commenter 1,
> There is new additional warning:
> Resource_Manager.cxx:126, GNU C Compiler 4 (gcc), Priority: Normal
> enumeration value 'Resource_KOL_End' not handled in switch [-Wswitch]
this is compiler bug - this condition should never happen.
Nevertheless, please check compilation of patch (no testing needed) in branch CR26613_1 with compiler warning eliminated.
> There is new additional warning:
> Resource_Manager.cxx:126, GNU C Compiler 4 (gcc), Priority: Normal
> enumeration value 'Resource_KOL_End' not handled in switch [-Wswitch]
this is compiler bug - this condition should never happen.
Nevertheless, please check compilation of patch (no testing needed) in branch CR26613_1 with compiler warning eliminated.
Dear Commenter 1,
Branch CR26613_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms on Release mode.
[revision removed]
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)
Branch CR26613_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms on Release mode.
[revision removed]
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)
Branch [archived branch] has been deleted by Commenter 3.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Commenter 3.
[revision removed]
[revision removed]