[Python-checkins] Fix signed/unsigned comparison to avoid compilation warning (GH-24441)
zooba
webhook-mailer at python.org
Thu Feb 4 16:38:29 EST 2021
https://github.com/python/cpython/commit/28873a70503c9e700fe05c3f9c781dbd6ea19b14
commit: 28873a70503c9e700fe05c3f9c781dbd6ea19b14
branch: master
author: Ken Jin <28750310+Fidget-Spinner at users.noreply.github.com>
committer: zooba <steve.dower at microsoft.com>
date: 2021-02-04T21:38:18Z
summary:
Fix signed/unsigned comparison to avoid compilation warning (GH-24441)
files:
M PC/winreg.c
diff --git a/PC/winreg.c b/PC/winreg.c
index d62a7be28d3fa..fb488d8eb0296 100644
--- a/PC/winreg.c
+++ b/PC/winreg.c
@@ -680,7 +680,7 @@ _Py_COMP_DIAG_POP
assert(size > 0);
len = PyUnicode_AsWideChar(t, P, size);
assert(len >= 0);
- assert(len < size);
+ assert((unsigned)len < size);
size -= (DWORD)len + 1;
P += len + 1;
}
More information about the Python-checkins
mailing list