Skip to content

_ssl_: Fix compiler warning #3559

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
Sep 14, 2017
Merged

_ssl_: Fix compiler warning #3559

merged 1 commit into from
Sep 14, 2017

Conversation

vstinner
Copy link
Member

Cast Py_buffer.len (Py_ssize_t, signed) to size_t (unsigned) to
prevent the following warning:

Modules/_ssl.c:3089:21: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]

Cast Py_buffer.len (Py_ssize_t, signed) to size_t (unsigned) to
prevent the following warning:

Modules/_ssl.c:3089:21: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
Copy link
Member

@tiran tiran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tiran
Copy link
Member

tiran commented Sep 14, 2017

3.6 is missing the overflow check, I'll backport it manually.

@tiran tiran merged commit 5a61559 into python:master Sep 14, 2017
@miss-islington
Copy link
Contributor

Thanks @Haypo for the PR, and @tiran for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @Haypo and @tiran, I could not cleanly backport this to 3.6 due to a conflict.
Please backport using cherry_picker on command line.

tiran pushed a commit to tiran/cpython that referenced this pull request Sep 14, 2017
Cast Py_buffer.len (Py_ssize_t, signed) to size_t (unsigned) to
prevent the following warning:

Modules/_ssl.c:3089:21: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare].
(cherry picked from commit 5a61559)
@vstinner vstinner deleted the ssl_warn branch September 14, 2017 08:12
@vstinner
Copy link
Member Author

3.6 is missing the overflow check, I'll backport it manually.

Ok. I removed the "needs backport to 3.6" to prevent the bug to try to do the backport.

tiran added a commit that referenced this pull request Sep 14, 2017
Cast Py_buffer.len (Py_ssize_t, signed) to size_t (unsigned) to
prevent the following warning:

Modules/_ssl.c:3089:21: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare].
(cherry picked from commit 5a61559)
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.

6 participants