This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Compiler warnings: initialization from incompatible pointer type
Type: compile error Stage: resolved
Components: Build Versions: Python 3.5
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: berker.peksag, chris.jerdonek, iritkatriel, mgedmin, vstinner
Priority: normal Keywords:

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:20adminsetgithub: 69264
2021-01-12 14:18:13iritkatrielsetstatus: open -> closed

nosy: + iritkatriel
messages: + msg384939

resolution: out of date
stage: resolved
2016-07-06 19:12:22chris.jerdoneksetnosy: + chris.jerdonek
2016-05-22 11:30:53berker.peksagsetnosy: + berker.peksag
messages: + msg266068
2015-09-18 13:23:55vstinnersetmessages: + msg250982
2015-09-14 22:42:32vstinnersetnosy: + vstinner
messages: + msg250713
2015-09-12 07:23:30mgedmincreate