diff options
author | Raymond Hettinger <rhettinger@users.noreply.github.com> | 2019-08-27 16:55:13 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-27 16:55:13 (GMT) |
commit | 0138c4ceab1e10d42d0aa962d2ae079b46da7671 (patch) | |
tree | 8077fd01b70f6ba38dd047900b5cefd0c6e4cfa0 /Objects | |
parent | 8bf5fef8737fdd12724b9340d76a4ed391c4ad8a (diff) | |
download | cpython-0138c4ceab1e10d42d0aa962d2ae079b46da7671.zip cpython-0138c4ceab1e10d42d0aa962d2ae079b46da7671.tar.gz cpython-0138c4ceab1e10d42d0aa962d2ae079b46da7671.tar.bz2 |
Fix unused variable and signed/unsigned warnings (GH-15537)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/unicodeobject.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index aa93377..d4b2c93 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -500,10 +500,14 @@ _PyUnicode_CheckConsistency(PyObject *op, int check_content) } else { PyCompactUnicodeObject *compact = (PyCompactUnicodeObject *)op; +#ifndef NDEBUG void *data; +#endif if (ascii->state.compact == 1) { +#ifndef NDEBUG data = compact + 1; +#endif _PyObject_ASSERT(op, kind == PyUnicode_1BYTE_KIND || kind == PyUnicode_2BYTE_KIND || kind == PyUnicode_4BYTE_KIND); @@ -512,9 +516,11 @@ _PyUnicode_CheckConsistency(PyObject *op, int check_content) _PyObject_ASSERT(op, compact->utf8 != data); } else { +#ifndef NDEBUG PyUnicodeObject *unicode = (PyUnicodeObject *)op; data = unicode->data.any; +#endif if (kind == PyUnicode_WCHAR_KIND) { _PyObject_ASSERT(op, ascii->length == 0); _PyObject_ASSERT(op, ascii->hash == -1); |