8000 Fix unused variable and signed/unsigned warnings by rhettinger · Pull Request #15537 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

Fix unused variable and signed/unsigned warnings #15537

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

Merged
merged 6 commits into from
Aug 27, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Simplify ifdef logic
  • Loading branch information
rhettinger committed Aug 27, 2019
commit 5f806bde2ec88425deff1ea332ca99bebd5b0d71
10 changes: 4 additions & 6 deletions Objects/unicodeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,12 +500,12 @@ _PyUnicode_CheckConsistency(PyObject *op, int check_content)
}
else {
PyCompactUnicodeObject *compact = (PyCompactUnicodeObject *)op;
#ifndef NDEBUG
void *data;
#endif

if (ascii->state.compact == 1) {
#ifdef NDEBUG
;
#else
#ifndef NDEBUG
data = compact + 1;
#endif
_PyObject_ASSERT(op, kind == PyUnicode_1BYTE_KIND
Expand All @@ -518,9 +518,7 @@ _PyUnicode_CheckConsistency(PyObject *op, int check_content)
else {
PyUnicodeObject *unicode = (PyUnicodeObject *)op;

#ifdef NDEBUG
;
#else
#ifndef NDEBUG
data = unicode->data.any;
#endif
if (kind == PyUnicode_WCHAR_KIND) {
Expand Down
0