Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implicit signedness conversion in PyFunctionFastCall #2729

Closed
JustAnotherArchivist opened this issue Nov 23, 2018 · 0 comments
Closed

Implicit signedness conversion in PyFunctionFastCall #2729

JustAnotherArchivist opened this issue Nov 23, 2018 · 0 comments

Comments

@JustAnotherArchivist
Copy link

With Cython 0.29 with Python 3.7.1 on Debian Sid, I get the following error (with -Werror) when compiling pyfuse3:

[...]
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.7m -c src/pyfuse3.c -o build/temp.linux-x86_64-3.7/src/pyfuse3.o -I/usr/include/fuse3 -DFUSE_USE_VERSION=32 -Wall -Wextra -Wconversion -Wsign-compare -DPYFUSE3_VERSION="1.1" -Wno-unused-function -Wno-implicit-fallthrough -Wno-unused-function -Wno-unused-parameter -Werror -Wfatal-errors -Wno-error=unreachable-code -Werror=conversion -Werror=sign-compare
src/pyfuse3.c: In function ‘__pyx_pymod_exec_pyfuse3’:
src/pyfuse3.c:1845:73: error: conversion to ‘long unsigned int’ from ‘Py_ssize_t’ {aka ‘long int’} may change the sign of the result [-Werror=sign-conversion]
      (void)(__pyx_pyframe_localsplus_offset = PyFrame_Type.tp_basicsize - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
                                                                         ^
src/pyfuse3.c:47086:3: note: in expansion of macro ‘__Pxy_PyFrame_Initialize_Offsets’
   __Pxy_PyFrame_Initialize_Offsets();
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
cc1: all warnings being treated as errors
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

According to python-llfuse/python-llfuse#21, this also happens with Cython 0.28 on macOS.

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

No branches or pull requests

2 participants