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
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
8000 Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix review comments
  • Loading branch information
rhettinger committed Aug 27, 2019
commit 03c60f55dde934b8b74668dc91b9d0352945b8d3
2 changes: 1 addition & 1 deletion Objects/unicodeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,9 +516,9 @@ _PyUnicode_CheckConsistency(PyObject *op, int check_content)
_PyObject_ASSERT(op, compact->utf8 != data);
}
else {
#ifndef NDEBUG
PyUnicodeObject *unicode = (PyUnicodeObject *)op;

#ifndef NDEBUG
data = unicode->data.any;
#endif
if (kind == PyUnicode_WCHAR_KIND) {
Expand Down
4 changes: 2 additions & 2 deletions Python/peephole.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@ PyCode_Optimize(PyObject *code, PyObject* consts, PyObject *names,
than +255 (encoded as multiple bytes), just to keep the peephole optimizer
simple. The optimizer leaves line number deltas unchanged. */

for (j = 0; j < (unsigned int) tabsiz; j += 2) {
if (lnotab[j] == 255) {
for (i = 0; i < tabsiz; i += 2) {
if (lnotab[i] == 255) {
goto exitUnchanged;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Python/pystrhex.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static PyObject *_Py_strhex_impl(const char* argbuf, const Py_ssize_t arglen,
}
resultlen += arglen * 2;

if (abs_bytes_per_sep >= (unsigned int) arglen) {
if ((size_t)abs_bytes_per_sep >= (size_t)arglen) {
bytes_per_sep_group = 0;
abs_bytes_per_sep = 0;
}
Expand Down
0