From a8eb58546b37a7cd5f332f019bb07388f5212c2d Mon Sep 17 00:00:00 2001 From: "A. Jesse Jiryu Davis" Date: Mon, 4 Jun 2018 06:57:08 -0400 Subject: bpo-31849: Fix warning in pyhash.c (GH-6799) --- Python/pyhash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Python/pyhash.c') diff --git a/Python/pyhash.c b/Python/pyhash.c index 6fc12fde3f..4c0b929586 100644 --- a/Python/pyhash.c +++ b/Python/pyhash.c @@ -272,8 +272,8 @@ fnv(const void *src, Py_ssize_t len) x = (_PyHASH_MULTIPLIER * x) ^ (Py_uhash_t) *p++; x ^= (Py_uhash_t) len; x ^= (Py_uhash_t) _Py_HashSecret.fnv.suffix; - if (x == -1) { - x = -2; + if (x == (Py_uhash_t) -1) { + x = (Py_uhash_t) -2; } return x; } -- cgit v1.2.1