Skip to content
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

New warning in ssl.c: conversion from 'uint64_t' to 'long', possible loss of data #106687

Closed
sobolevn opened this issue Jul 12, 2023 · 3 comments
Closed
Labels
type-bug An unexpected behavior, bug, or error

Comments

@sobolevn sobolevn added the type-bug An unexpected behavior, bug, or error label Jul 12, 2023
vstinner added a commit to vstinner/cpython that referenced this issue Jul 12, 2023
SSL_CTX_get_options() uses uint64_t for options:
https://www.openssl.org/docs/man3.1/man3/SSL_CTX_get_options.html

Fix this compiler warning on Windows with MSC:

    conversion from 'uint64_t' to 'long', possible loss of data
@vstinner
Copy link
Member

I wrote PR #106700 to fix the compiler warning.

vstinner added a commit to vstinner/cpython that referenced this issue Jul 12, 2023
SSL_CTX_get_options() uses uint64_t for options:
https://www.openssl.org/docs/man3.1/man3/SSL_CTX_get_options.html

Fix this compiler warning on Windows with MSC:

    conversion from 'uint64_t' to 'long', possible loss of data
vstinner added a commit to vstinner/cpython that referenced this issue Jul 17, 2023
SSL_CTX_get_options() uses uint64_t for options:
https://www.openssl.org/docs/man3.1/man3/SSL_CTX_get_options.html

Fix this compiler warning on Windows with MSC:

    conversion from 'uint64_t' to 'long', possible loss of data
vstinner added a commit that referenced this issue Jul 17, 2023
SSL_CTX_get_options() uses uint64_t for options:
https://www.openssl.org/docs/man3.1/man3/SSL_CTX_get_options.html

Fix this compiler warning on Windows with MSC:

    conversion from 'uint64_t' to 'long', possible loss of data
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jul 17, 2023
SSL_CTX_get_options() uses uint64_t for options:
https://www.openssl.org/docs/man3.1/man3/SSL_CTX_get_options.html

Fix this compiler warning on Windows with MSC:

    conversion from 'uint64_t' to 'long', possible loss of data
(cherry picked from commit ad95c72)

Co-authored-by: Victor Stinner <[email protected]>
@vstinner
Copy link
Member

I fixed the compiler warning in 3.12 and main branches. I close the issue.

Python 3.11 doesn't seem to emit a compiler warning. So I prefer to leave it unchanged for now, but only change the code if it starts to emit a warning: see #99079 which suggests upgrading OpenSSL from 1.1 to 3.0.

See PR #106700 for details.

vstinner added a commit that referenced this issue Jul 17, 2023
…6827)

gh-106687: _ssl: use uint64_t for SSL options (GH-106700)

SSL_CTX_get_options() uses uint64_t for options:
https://www.openssl.org/docs/man3.1/man3/SSL_CTX_get_options.html

Fix this compiler warning on Windows with MSC:

    conversion from 'uint64_t' to 'long', possible loss of data
(cherry picked from commit ad95c72)

Co-authored-by: Victor Stinner <[email protected]>
@sobolevn
Copy link
Member Author

Thank you, @vstinner!

vstinner added a commit that referenced this issue Mar 13, 2024
gh-106687: _ssl: use uint64_t for SSL options (#106700)

SSL_CTX_get_options() uses uint64_t for options:
https://www.openssl.org/docs/man3.1/man3/SSL_CTX_get_options.html

Fix this compiler warning on Windows with MSC:

    conversion from 'uint64_t' to 'long', possible loss of data

(cherry picked from commit ad95c72)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants