]> granicus.if.org Git - gc/commit
Fix subexpression widening in memhash() of disclaim_weakmap_test
authorIvan Maidanski <ivmai@mail.ru>
Wed, 21 Aug 2019 08:31:52 +0000 (11:31 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 21 Aug 2019 08:31:52 +0000 (11:31 +0300)
commit508292feccc04648da687e1fdadecbba908fba4e
tree97543d1d35af31fad8662a317368c7f3d8dc58ec
parentd8e2aa0c53eaf00f973390be10a63a23f95d343d
Fix subexpression widening in memhash() of disclaim_weakmap_test
(fix of commit 0cc2c0e7e)

It would be more correct to widen the argument (from unsigned to
GC_word) of multiply operation instead of implicit widening of the
result.

* tests/disclaim_weakmap_test.c (memhash): Cast acc to GC_word before
multiplying by 2003; cast the whole expression to unsigned type (before
assigning it to acc).
tests/disclaim_weakmap_test.c