DiscussionsIssue archiveOCCT:Configuration

Archived issue #0027118

Configuration - do not suppress deprecation warnings when using msvc

Open CASCADEOCCT:Configurationclosed8 public notes

Search issues

Description

VS project files generated by CMake and genproj.bat define option -wd4996 to suppress useless security warnings (when using "insecure" version of C functions instead of msvc-specific "secure" version).

This flag has a side effect - not only secure warnings are suppressed, but ALL deprecation warnings (e.g. defined with __declspec(deprecated)). This should be fixed.

Steps to reproduce

N/A

Public activity

8 archived notes

Participants are labeled by their role within this record.

01Commenter 1
Branch [archived branch] has been created by Author.

[revision removed]


Detailed log of new commits:

Author: Author
Date: Sat Jan 30 15:51:35 2016 +0300

    0027118: Configuration - do not suppress deprecation warnings when using msvc
    
    Patch removes option -wd4996 from VS project settings (which suppresses old deprecation warnings).
    Instead, macros _CRT_SECURE_NO_WARNINGS (suppresses 444 warnings)
    and _CRT_NONSTDC_NO_DEPRECATE (suppresses 17 warnings) have been added.
    
    gethostbyname() deprecation warning has been suppressed locally in STEPConstruct_AP203Context.cxx,
    as well as GetVersionEx() in OSD_Host.cxx.
02Author
Patch is ready for review in branch CR27118 of OCCT and Products repositories (only adm/cmake/occt_defs_flags.cmake is changed within Products).
03Commenter 1
Branch [archived branch] has been created by Participant.

[revision removed]


Detailed log of new commits:

Author: Author
Date: Sat Jan 30 15:51:35 2016 +0300

    0027118: Configuration - do not suppress deprecation warnings when using msvc
    
    Patch removes option -wd4996 from VS project settings (which suppresses old deprecation warnings).
    Instead, macros _CRT_SECURE_NO_WARNINGS (suppresses 444 warnings) and _CRT_NONSTDC_NO_DEPRECATE (suppresses 17 warnings) have been added.
    
    Deprecation warning on GetVersionEx() has been suppressed locally in OSD_Host.cxx.
    In STEPConstruct_AP203Context.cxx, OSD_Host is used instead of low-level system functions.
    This eliminates dependency of TKSTEP on winsock32.lib on Windows.

Author: Author
Date: Sat Jan 30 14:54:12 2016 +0300

    0027113: Coding - add macros Standard_DEPRECATED for marking deprecated functionality
04Commenter 1
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
05Commenter 1
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
06Commenter 2
Tested in framework of branch CR27111_6
07Commenter 1
Branch [archived branch] has been deleted by Author.

[revision removed]
08Commenter 1
Branch [archived branch] has been deleted by Author.

[revision removed]

Related records