diff options
author | Segev Finer <segev208@gmail.com> | 2017-07-26 22:17:57 (GMT) |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2017-07-26 22:17:57 (GMT) |
commit | 679b566622ec811c5e5d580f6a538f7a43006e05 (patch) | |
tree | 52be9b1a2d2e0e567d8fa44c72a71659647460de /Modules | |
parent | f0851910eb8e711bf8f22165cb0df33bb27b09d6 (diff) | |
download | cpython-679b566622ec811c5e5d580f6a538f7a43006e05.zip cpython-679b566622ec811c5e5d580f6a538f7a43006e05.tar.gz cpython-679b566622ec811c5e5d580f6a538f7a43006e05.tar.bz2 |
bpo-9566: Fix some Windows x64 compiler warnings (#2492)
* bpo-9566: Silence liblzma warnings
* bpo-9566: Silence tcl warnings
* bpo-9566: Silence tk warnings
* bpo-9566: Silence tix warnings
* bpo-9566: Fix some library warnings
* bpo-9566: Fix msvcrtmodule.c warnings
* bpo-9566: Silence _bz2 warnings
* bpo-9566: Fixed some _ssl warnings
* bpo-9566: Fix _msi warnings
* bpo-9566: Silence _ctypes warnings
* Revert "bpo-9566: Fixed some _ssl warnings"
This reverts commit a639001c949ba53338a9ee047d2ec1efd2505e6f.
* bpo-9566: Also consider NULL as a possible error in HANDLE_return_converter
* bpo-9566: whitespace fixes
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/binascii.c | 2 | ||||
-rw-r--r-- | Modules/zlibmodule.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Modules/binascii.c b/Modules/binascii.c index 1f9ff5a..1af6b7f 100644 --- a/Modules/binascii.c +++ b/Modules/binascii.c @@ -372,7 +372,7 @@ binascii_b2a_uu_impl(PyObject *module, Py_buffer *data, int backtick) if (backtick && !bin_len) *ascii_data++ = '`'; else - *ascii_data++ = ' ' + bin_len; + *ascii_data++ = ' ' + (unsigned char)bin_len; for( ; bin_len > 0 || leftbits != 0 ; bin_len--, bin_data++ ) { /* Shift the data (or padding) into our buffer */ diff --git a/Modules/zlibmodule.c b/Modules/zlibmodule.c index cfe7f88..32dd817 100644 --- a/Modules/zlibmodule.c +++ b/Modules/zlibmodule.c @@ -142,7 +142,7 @@ PyZlib_Free(voidpf ctx, void *ptr) static void arrange_input_buffer(z_stream *zst, Py_ssize_t *remains) { - zst->avail_in = Py_MIN((size_t)*remains, UINT_MAX); + zst->avail_in = (uInt)Py_MIN((size_t)*remains, UINT_MAX); *remains -= zst->avail_in; } @@ -177,7 +177,7 @@ arrange_output_buffer_with_maximum(z_stream *zst, PyObject **buffer, } } - zst->avail_out = Py_MIN((size_t)(length - occupied), UINT_MAX); + zst->avail_out = (uInt)Py_MIN((size_t)(length - occupied), UINT_MAX); zst->next_out = (Byte *)PyBytes_AS_STRING(*buffer) + occupied; return length; |