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

Zope5.2.1 install warnings #174

Open
gpzope opened this issue Jun 8, 2021 · 3 comments
Open

Zope5.2.1 install warnings #174

gpzope opened this issue Jun 8, 2021 · 3 comments

Comments

@gpzope
Copy link

gpzope commented Jun 8, 2021

Hi, some warning during installation on mac OS 10.13.6 - Python 3.7.7 with minimal buildout.cfg as in documentation.

src/ExtensionClass/_ExtensionClass.c:800:33: warning: comparison of integers of
different signs: 'Py_ssize_t' (aka 'long') and 'unsigned long'
[-Wsign-compare]
if (typ->tp_basicsize <= sizeof(_emptyobject))

In file included from src/BTrees/_LQBTree.c:44:
src/BTrees/BTreeModuleTemplate.c:103:1: warning: unused function
'ulonglong_check' [-Wunused-function]
ulonglong_check(PyObject *ob)

In file included from src/BTrees/_QOBTree.c:42:
src/BTrees/BTreeModuleTemplate.c:132:1: warning: unused function
'longlong_check' [-Wunused-function]
longlong_check(PyObject *ob)

src/BTrees/BTreeModuleTemplate.c:201:1: warning: unused function
'longlong_as_object' [-Wunused-function]
longlong_as_object(PY_LONG_LONG val)

src/BTrees/BTreeModuleTemplate.c:209:1: warning: unused function
'longlong_convert' [-Wunused-function]
longlong_convert(PyObject *ob, PY_LONG_LONG *value)

In file included from src/BTrees/_QQBTree.c:45:
src/BTrees/BTreeModuleTemplate.c:132:1: warning: unused function
'longlong_check' [-Wunused-function]
longlong_check(PyObject *ob)

src/BTrees/BTreeModuleTemplate.c:201:1: warning: unused function
'longlong_as_object' [-Wunused-function]
longlong_as_object(PY_LONG_LONG val)

src/BTrees/BTreeModuleTemplate.c:209:1: warning: unused function
'longlong_convert' [-Wunused-function]
longlong_convert(PyObject *ob, PY_LONG_LONG *value)

In file included from src/BTrees/_QFBTree.c:44:
src/BTrees/BTreeModuleTemplate.c:132:1: warning: unused function
'longlong_check' [-Wunused-function]
longlong_check(PyObject *ob)

src/BTrees/BTreeModuleTemplate.c:201:1: warning: unused function
'longlong_as_object' [-Wunused-function]
longlong_as_object(PY_LONG_LONG val)
^
src/BTrees/BTreeModuleTemplate.c:209:1: warning: unused function
'longlong_convert' [-Wunused-function]
longlong_convert(PyObject *ob, PY_LONG_LONG *value)

In file included from src/BTrees/_QLBTree.c:44:
src/BTrees/BTreeModuleTemplate.c:132:1: warning: unused function
'longlong_check' [-Wunused-function]
longlong_check(PyObject *ob)
^
1 warning generated.
In file included from src/BTrees/_OQBTree.c:42:
src/BTrees/BTreeModuleTemplate.c:201:1: warning: unused function
'longlong_as_object' [-Wunused-function]
longlong_as_object(PY_LONG_LONG val)
^
src/BTrees/BTreeModuleTemplate.c:209:1: warning: unused function
'longlong_convert' [-Wunused-function]
longlong_convert(PyObject *ob, PY_LONG_LONG *value)

Getting distribution for 'AccessControl==5.0'.
src/AccessControl/cAccessControl.c:2202:7: warning: code will never be executed
[-Wunreachable-code]
unauthErr(name, v);
^~~~~~~~~

@jugmac00 jugmac00 transferred this issue from zopefoundation/Zope Jun 8, 2021
@jugmac00
Copy link
Member

jugmac00 commented Jun 8, 2021

Moved to BTrees as the most warnings originate from here - for the other warnings, I create separate issues at the respective repos.

Thanks for reporting the issue!

@jamadden
Copy link
Member

jamadden commented Jun 8, 2021

Thanks for the report. The warnings here are just about unused static functions. They arise because of the complicated way this package builds its sources by using low-level C macros and #include of other source files. This makes development complicated (C linters, for example, tend to produce hundreds and hundreds of false warnings too).

These warnings do not represent any actual problem. And most users won't ever see them; most users will get binary wheels, or use pip, which hides that output. Most likely, the linker will even remove those static functions.

This could probably be worked around with more low-level C macro hijinks or yet more #include files. But, since they're not a real problem, I haven't been motivated to try to deal with them. (The linter issues could also probably be fixed with some work, but personally, I'd really like to update this project to use some more modern idioms. Specifically, I'm wondering if a little bit of C++ templating could be used instead.)

@gpzope
Copy link
Author

gpzope commented Jun 8, 2021

Thanks to all of you guys.

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

3 participants