]> granicus.if.org Git - postgresql/commit
Suppress compiler warnings in dshash.c.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 3 Sep 2017 15:12:29 +0000 (11:12 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 3 Sep 2017 15:12:29 +0000 (11:12 -0400)
commit4faa1dc2eb02ba67303110e025d44abb40b12725
treed84d18aea235b4db3b1639959842225b51e10b5c
parente451901804bd96a6b0fe3875b5c90aa0555c6a05
Suppress compiler warnings in dshash.c.

Some compilers complain, not unreasonably, about left-shifting an
int32 "1" and then assigning the result to an int64.  In practice
I sure hope that this data structure never gets large enough that
an overflow would actually occur; but let's cast the constant to
the right type to avoid the hazard.

In passing, fix a typo in dshash.h.

Amit Kapila, adjusted as per comment from Thomas Munro.

Discussion: https://postgr.es/m/CAA4eK1+5vfVMYtjK_NX8O3-42yM3o80qdqWnQzGquPrbq6mb+A@mail.gmail.com
src/backend/lib/dshash.c
src/include/lib/dshash.h