Skip to content

Conversation

@eamanu
Copy link
Contributor

@eamanu eamanu commented May 8, 2019

When run ./configure && make -j4 there are two warnings on
Object/dictobject.c file about ix and hash variable are not used.

Zachary Ware make me note that when _PyObject_ASSERT is call and NDEBUG
is defined that expand to ((void)0).

So this PR add a #ifndef check to avoid the warnings.

https://bugs.python.org/issue36869

When run ```./configure && make -j4``` there are two warnings on
Object/dictobject.c file about ix and hash variable are not used.

Zachary Ware make me note that when _PyObject_ASSERT is call and NDEBUG
is defined that expand to ((void)0).

So this PR add a #ifndef check to avoid the warnings.
@methane
Copy link
Member

methane commented May 8, 2019

Note that this function does nothing when NDEBUG is defined.
It doesn't make sense adding #ifndef NDEBUG for specific part.

Add it in top of the function, and add #endif just before return 1.

@eamanu
Copy link
Contributor Author

eamanu commented May 10, 2019

Thanks for your comment @methane, I made the change

I will open a issue on bpo

@eamanu eamanu changed the title Avoid warning of unused variables bpo-36869: Avoid warning of unused variables May 10, 2019
@methane methane merged commit a2fedd8 into python:master May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants