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

Suppress ‘PyStr_Concat’ defined but not used [-Wunused-function] warning #18

Closed
jonathanunderwood opened this issue Dec 14, 2017 · 3 comments

Comments

@jonathanunderwood
Copy link
Contributor

On Python 2.7, when using py3c, I see a lot of noise from the compiler like this:

In file included from py3c/py3c.h:31:0,
                   from lz4/_version.c:38:
  py3c/py3c/compat.h:76:18: warning: ‘PyStr_Concat’ defined but not used [-Wunused-function]
   static PyObject *PyStr_Concat(PyObject *left, PyObject *right) {

with the default compiler flags on Fedora, which include -Wunused-function. This is, of course, a harmless warning, and entirely expected from the definition in compat.h of PyStr_Concat. Perhaps that function should be declared __attribute__((unused)) to suppress that warning for that definition?

@encukou
Copy link
Owner

encukou commented Dec 14, 2017

Indeed, __attribute__((unused)) (with GCC guards) would be helpful.

@jonathanunderwood
Copy link
Contributor Author

PR #19 does exactly that.

@encukou
Copy link
Owner

encukou commented Dec 19, 2017

Closed in #19. Thank you for the fix!

@encukou encukou closed this as completed Dec 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants