summaryrefslogtreecommitdiffstats
path: root/Modules/zlibmodule.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-06-24 21:02:51 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-06-24 21:02:51 (GMT)
commitbc8ccce7298df728b2d81bd9c3bb9c8e236b882b (patch)
tree03e5e7818ff6dd9dda123e587c46654cee693dc5 /Modules/zlibmodule.c
parent9a282975ef37fbee5bdacd1633f9de8c249bb5cf (diff)
downloadcpython-bc8ccce7298df728b2d81bd9c3bb9c8e236b882b.zip
cpython-bc8ccce7298df728b2d81bd9c3bb9c8e236b882b.tar.gz
cpython-bc8ccce7298df728b2d81bd9c3bb9c8e236b882b.tar.bz2
Issue #9566: zlib: Explicit cast to unsigned int to fix a compiler warning on Windows x64
Diffstat (limited to 'Modules/zlibmodule.c')
-rw-r--r--Modules/zlibmodule.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/zlibmodule.c b/Modules/zlibmodule.c
index 0b0d887..8100cbf 100644
--- a/Modules/zlibmodule.c
+++ b/Modules/zlibmodule.c
@@ -1094,10 +1094,10 @@ PyZlib_adler32(PyObject *self, PyObject *args)
buf += (size_t) UINT_MAX;
len -= (size_t) UINT_MAX;
}
- adler32val = adler32(adler32val, buf, len);
+ adler32val = adler32(adler32val, buf, (unsigned int)len);
Py_END_ALLOW_THREADS
} else {
- adler32val = adler32(adler32val, pbuf.buf, pbuf.len);
+ adler32val = adler32(adler32val, pbuf.buf, (unsigned int)pbuf.len);
}
PyBuffer_Release(&pbuf);
return PyLong_FromUnsignedLong(adler32val & 0xffffffffU);
@@ -1132,10 +1132,10 @@ PyZlib_crc32(PyObject *self, PyObject *args)
buf += (size_t) UINT_MAX;
len -= (size_t) UINT_MAX;
}
- signed_val = crc32(crc32val, buf, len);
+ signed_val = crc32(crc32val, buf, (unsigned int)len);
Py_END_ALLOW_THREADS
} else {
- signed_val = crc32(crc32val, pbuf.buf, pbuf.len);
+ signed_val = crc32(crc32val, pbuf.buf, (unsigned int)pbuf.len);
}
PyBuffer_Release(&pbuf);
return PyLong_FromUnsignedLong(signed_val & 0xffffffffU);