diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-10-01 11:29:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-01 11:29:53 (GMT) |
commit | 6314abcc08f5d0f3d3a915dc9455ea223fa65517 (patch) | |
tree | c73552b5f390cdac60b4c67339161d61ab2b20ef /Objects | |
parent | 5e0ea7540f577c9684e272000fdfc80d29bb78a2 (diff) | |
download | cpython-6314abcc08f5d0f3d3a915dc9455ea223fa65517.zip cpython-6314abcc08f5d0f3d3a915dc9455ea223fa65517.tar.gz cpython-6314abcc08f5d0f3d3a915dc9455ea223fa65517.tar.bz2 |
bpo-37802: Fix a compiler warning in longobject.c (GH-16517)
bpo-37802, bpo-38321: Fix the following warnings:
longobject.c(420): warning C4244: 'function': conversion from
'unsigned __int64' to 'sdigit', possible loss of data
longobject.c(428): warning C4267: 'function': conversion from
'size_t' to 'sdigit', possible loss of data
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/longobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c index f2f6f95..2b57ea1 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -383,7 +383,7 @@ PyLong_FromLong(long ival) #define PYLONG_FROM_UINT(INT_TYPE, ival) \ do { \ if (IS_SMALL_UINT(ival)) { \ - return get_small_int((ival)); \ + return get_small_int((sdigit)(ival)); \ } \ /* Count the number of Python digits. */ \ Py_ssize_t ndigits = 0; \ |