Issue 25077: Compiler warnings: initialization from incompatible pointer type (original) (raw)

Created on 2015-09-12 07:23 by mgedmin, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (5)
msg250513 - (view) Author: Marius Gedminas (mgedmin) * Date: 2015-09-12 07:23
I'm seeing these compiler warnings while trying to build Python 3.5 on Ubuntu 15.04: In file included from Python/ceval.c:300:0: Python/ceval_gil.h: In function ‘drop_gil’: Python/ceval_gil.h:181:144: warning: initialization from incompatible pointer type _Py_atomic_store_relaxed(&gil_last_holder, tstate); ^ In file included from Python/ceval.c:300:0: Python/ceval_gil.h: In function ‘take_gil’: Python/ceval_gil.h:243:144: warning: initialization from incompatible pointer type _Py_atomic_store_relaxed(&gil_last_holder, tstate); ^ Python/pystate.c: In function ‘PyThreadState_Swap’: Python/pystate.c:509:147: warning: initialization from incompatible pointer type _Py_atomic_store_relaxed(&_PyThreadState_Current, newts); ^ /home/mg/src/cpython/Modules/_ctypes/libffi/src/x86/ffi64.c: In function ‘classify_argument’: /home/mg/src/cpython/Modules/_ctypes/libffi/src/x86/ffi64.c:224:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < words; i++) ^ /home/mg/src/cpython/Modules/_ctypes/libffi/src/x86/ffi64.c:245:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < num; i++) ^ /home/mg/src/cpython/Modules/_ctypes/libffi/src/x86/ffi64.c:264:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 1; i < words; i++) ^ /home/mg/src/cpython/Modules/_ctypes/libffi/src/x86/ffi64.c:270:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < words; i++) ^ /home/mg/src/cpython/Modules/_ctypes/libffi/src/x86/ffi64.c: In function ‘examine_argument’: /home/mg/src/cpython/Modules/_ctypes/libffi/src/x86/ffi64.c:323:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < n; ++i) ^ /home/mg/src/cpython/Modules/_ctypes/libffi/src/x86/ffi64.c: In function ‘ffi_call’: /home/mg/src/cpython/Modules/_ctypes/libffi/src/x86/ffi64.c:484:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (j = 0; j < n; j++, a += 8, size -= 8) ^ /home/mg/src/cpython/Modules/_ctypes/libffi/src/x86/ffi64.c: In function ‘ffi_closure_unix64_inner’: /home/mg/src/cpython/Modules/_ctypes/libffi/src/x86/ffi64.c:659:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (j = 0; j < n; j++, a += 8) ^ I saw bug #1616 and thought you might want to know about these.
msg250713 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-09-14 22:42
For ceval, it comes from pyatomic.h: see my atomic_pointer.patch attached to the issue #25077.
msg250982 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-09-18 13:23
"For ceval, it comes from pyatomic.h: see my atomic_pointer.patch attached to the issue #25077." Oops, it's the issue #22038.
msg266068 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-05-22 11:30
libffi warnings have already been fixed in upstream libffi. See issue 23085 for updating our libffi copy.
msg384939 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-01-12 14:18
Issues 22038 and 23085 seem to have fixed all these warnings between them.
History
Date User Action Args
2022-04-11 14:58:20 admin set github: 69264
2021-01-12 14🔞13 iritkatriel set status: open -> closednosy: + iritkatrielmessages: + resolution: out of datestage: resolved
2016-07-06 19:12:22 chris.jerdonek set nosy: + chris.jerdonek
2016-05-22 11:30:53 berker.peksag set nosy: + berker.peksagmessages: +
2015-09-18 13:23:55 vstinner set messages: +
2015-09-14 22:42:32 vstinner set nosy: + vstinnermessages: +
2015-09-12 07:23:30 mgedmin create