Skip to content

Commit

Permalink
bpo-31849: Fix warning in pyhash.c (GH-6799)
Browse files Browse the repository at this point in the history
(cherry picked from commit a8eb585)

Co-authored-by: A. Jesse Jiryu Davis <jesse@emptysquare.net>
  • Loading branch information
miss-islington and ajdavis committed Jun 4, 2018
1 parent 7548a93 commit 150033d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix signed/unsigned comparison warning in pyhash.c.
4 changes: 2 additions & 2 deletions Python/pyhash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 150033d

Please sign in to comment.