Archived issue #0026613

Coding - avoid use of macros in Resource_Manager.cxx

CommunityOCCT:Codingclosed12 public notes

Search issues

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.

01Commenter 2
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.
02Commenter 3
Patch is ready for review.
03Commenter 3
No remarks, please test
04Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
05Commenter 5
Branch [archived branch] has been rebased on the current master
06Commenter 6
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%]
07Commenter 2
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

08Commenter 2
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.
09Commenter 3
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.
10Commenter 10
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)

11Commenter 2
Branch [archived branch] has been deleted by Commenter 3.

[revision removed]
12Commenter 2
Branch [archived branch] has been deleted by Commenter 3.

[revision removed]