diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-08-17 20:20:00 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-08-17 20:20:00 (GMT) |
commit | 049e509a9f87d1f82ae0ebfe21c226f37ce9fbdb (patch) | |
tree | 96885f696a33000548163e8b4bab6415dd842dde /Modules/_lzmamodule.c | |
parent | daca3d7e9b48badf02521df1b729ddd2733b2d77 (diff) | |
download | cpython-049e509a9f87d1f82ae0ebfe21c226f37ce9fbdb.zip cpython-049e509a9f87d1f82ae0ebfe21c226f37ce9fbdb.tar.gz cpython-049e509a9f87d1f82ae0ebfe21c226f37ce9fbdb.tar.bz2 |
Issue #22207: Fix "comparison between signed and unsigned integers" warning in
test checking for integer overflow on Py_ssize_t type: cast explicitly to
size_t.
Diffstat (limited to 'Modules/_lzmamodule.c')
-rw-r--r-- | Modules/_lzmamodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_lzmamodule.c b/Modules/_lzmamodule.c index c43676a..dfb95fa 100644 --- a/Modules/_lzmamodule.c +++ b/Modules/_lzmamodule.c @@ -533,7 +533,7 @@ compress(Compressor *c, uint8_t *data, size_t len, lzma_action action) c->lzs.avail_out = PyBytes_GET_SIZE(result) - data_size; } } - if (data_size != PyBytes_GET_SIZE(result)) + if (data_size != (size_t)PyBytes_GET_SIZE(result)) if (_PyBytes_Resize(&result, data_size) == -1) goto error; return result; @@ -931,7 +931,7 @@ decompress(Decompressor *d, uint8_t *data, size_t len) d->lzs.avail_out = PyBytes_GET_SIZE(result) - data_size; } } - if (data_size != PyBytes_GET_SIZE(result)) + if (data_size != (size_t)PyBytes_GET_SIZE(result)) if (_PyBytes_Resize(&result, data_size) == -1) goto error; return result; |