[Python-checkins] bpo-36672: Fix a compiler warning in winreg.SetValue() (GH-12882)
Steve Dower
webhook-mailer at python.org
Mon Apr 22 13:09:37 EDT 2019
https://github.com/python/cpython/commit/34366b7f914eedbcc33aebe882098a2199ffaf82
commit: 34366b7f914eedbcc33aebe882098a2199ffaf82
branch: master
author: Zackery Spytz <zspytz at gmail.com>
committer: Steve Dower <steve.dower at microsoft.com>
date: 2019-04-22T10:08:05-07:00
summary:
bpo-36672: Fix a compiler warning in winreg.SetValue() (GH-12882)
files:
M PC/winreg.c
diff --git a/PC/winreg.c b/PC/winreg.c
index 28b316ae2f4c..5469fcba0444 100644
--- a/PC/winreg.c
+++ b/PC/winreg.c
@@ -1614,7 +1614,7 @@ winreg_SetValue_impl(PyObject *module, HKEY key, const Py_UNICODE *sub_key,
}
Py_BEGIN_ALLOW_THREADS
- rc = RegSetValueW(key, sub_key, REG_SZ, value, value_length+1);
+ rc = RegSetValueW(key, sub_key, REG_SZ, value, (DWORD)(value_length + 1));
Py_END_ALLOW_THREADS
if (rc != ERROR_SUCCESS)
return PyErr_SetFromWindowsErrWithFunction(rc, "RegSetValue");
More information about the Python-checkins
mailing list