[New-bugs-announce] [issue25077] Compiler warnings: initialization from incompatible pointer type

Marius Gedminas report at bugs.python.org
Sat Sep 12 09:23:30 CEST 2015


New submission from Marius Gedminas:

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.

----------
components: Build
messages: 250513
nosy: mgedmin
priority: normal
severity: normal
status: open
title: Compiler warnings: initialization from incompatible pointer type
type: compile error
versions: Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25077>
_______________________________________


More information about the New-bugs-announce mailing list