Skip to content

[2.7] bpo-35359: Add _CRT_SECURE_NO_WARNINGS to pythoncore project #10819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 6, 2018
Merged

[2.7] bpo-35359: Add _CRT_SECURE_NO_WARNINGS to pythoncore project #10819

merged 1 commit into from
Dec 6, 2018

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Nov 30, 2018

Define _CRT_SECURE_NO_WARNINGS in the Visual Studio pythoncore
project to make quiet security warnings when building zlib C files
(Modules\zlib\ subdirectory).

https://bugs.python.org/issue35359

@vstinner vstinner changed the title bpo-35359: Add _CRT_SECURE_NO_WARNINGS to pythoncore project [2.7] bpo-35359: Add _CRT_SECURE_NO_WARNINGS to pythoncore project Nov 30, 2018
@vstinner
Copy link
Member Author

continuous-integration/appveyor/pr — AppVeyor was unable to build non-mergeable pull request

What's wrong with you, AppVeyor!?

Define _CRT_SECURE_NO_WARNINGS in the Visual Studio pythoncore
project to make quiet security warnings when building zlib C files
(Modules\zlib\ subdirectory).
@vstinner
Copy link
Member Author

I rebased this PR on top of merged PR #10817 to see if it works around the AppVeyor issue?

@vstinner vstinner requested review from zware and zooba November 30, 2018 12:05
@vstinner
Copy link
Member Author

@zooba, @zware: Does it sound something reasonable to you?

@vstinner
Copy link
Member Author

vstinner commented Dec 3, 2018

@zooba, @zware: I plan to merge this change at the end of the week.

@vstinner
Copy link
Member Author

vstinner commented Dec 6, 2018

I checked AppVeyor logs and I confirm that this PR makes the warnings quiet. Example of fixed warning:

[00:03:16] ..\Modules\zlib\gzlib.c(193): warning C4996: 'wcstombs': This function or variable may be unsafe. Consider using wcstombs_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\projects\cpython\PCbuild\pythoncore.vcxproj]
[00:03:16]           C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\stdlib.h(534) : see declaration of 'wcstombs'

@vstinner vstinner merged commit 49cedc5 into python:2.7 Dec 6, 2018
@vstinner vstinner deleted the zlib branch December 6, 2018 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants