| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
This PR fix the following warnings: /home/vstinner/python/main/Include/cpython/pyatomic_gcc.h: In function ‘_Py_atomic_load_ptr’:
/home/vstinner/python/main/Include/cpython/pyatomic_gcc.h:300:34: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual]
300 | { return (void *)__atomic_load_n((void **)obj, __ATOMIC_SEQ_CST); }
| ^
/home/vstinner/python/main/Include/cpython/pyatomic_gcc.h: In function ‘_Py_atomic_load_ptr_relaxed’:
/home/vstinner/python/main/Include/cpython/pyatomic_gcc.h:359:34: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual]
359 | { return (void *)__atomic_load_n((const void **)obj, __ATOMIC_RELAXED); }
| ^
/home/vstinner/python/main/Include/cpython/pyatomic_gcc.h:359:10: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual]
359 | { return (void *)__atomic_load_n((const void **)obj, __ATOMIC_RELAXED); }
| ^
/home/vstinner/python/main/Include/cpython/pyatomic_gcc.h: In function ‘_Py_atomic_load_ptr_acquire’:
/home/vstinner/python/main/Include/cpython/pyatomic_gcc.h:493:34: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual]
493 | { return (void *)__atomic_load_n((void **)obj, __ATOMIC_ACQUIRE); }
| ^
/home/vstinner/python/main/Include/cpython/pyatomic_gcc.h: In function ‘_Py_atomic_load_uintptr_acquire’:
/home/vstinner/python/main/Include/cpython/pyatomic_gcc.h:497:37: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual]
497 | { return (uintptr_t)__atomic_load_n((uintptr_t *)obj, __ATOMIC_ACQUIRE); }
| ^
cc1: all warnings being treated as errors
error: command '/usr/bin/gcc' failed with exit code 1
|
Sorry, something went wrong.
|
My previous attempt using (const void * const *) cast didn't work well. The correct cast is to (void * const *). |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM!
Sorry, something went wrong.
|
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry, something went wrong.
(cherry picked from commit 9cd2dcb) Co-authored-by: Victor Stinner <vstinner@python.org>
|
GH-121057 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.