Compiler warnings on free-threaded build for `_hashopenssl.c` · Issue #132674 · python/cpython · GitHub
Skip to content

Compiler warnings on free-threaded build for _hashopenssl.c #132674

Description

@picnixz

Bug report

Bug description:

I get the following warnings since #128886, which was backported to 3.13.

./Modules/_hashopenssl.c:416:69: warning: passing 'const EVP_MD *' (aka 'const struct evp_md_st *') to parameter of type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
  416 |                 other_digest = _Py_atomic_exchange_ptr(&entry->evp, digest);
      |                                                                     ^~~~~~
./Include/cpython/pyatomic_gcc.h:194:42: note: passing argument to parameter 'value' here
  194 | _Py_atomic_exchange_ptr(void *obj, void *value)
      |                                          ^
./Modules/_hashopenssl.c:428:80: warning: passing 'const EVP_MD *' (aka 'const struct evp_md_st *') to parameter of type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
  428 |                 other_digest = _Py_atomic_exchange_ptr(&entry->evp_nosecurity, digest);
      |                                                                                ^~~~~~
./Include/cpython/pyatomic_gcc.h:194:42: note: passing argument to parameter 'value' here
  194 | _Py_atomic_exchange_ptr(void *obj, void *value)

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

3.13bugs and security fixes3.14bugs and security fixesbuildThe build process and cross-buildextension-modulesC modules in the Modules dirtopic-free-threadingtype-bugAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions