diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2017-09-03 11:12:29 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2017-09-03 11:12:29 -0400 |
commit | 4faa1dc2eb02ba67303110e025d44abb40b12725 (patch) | |
tree | d84d18aea235b4db3b1639959842225b51e10b5c /src/include/lib | |
parent | e451901804bd96a6b0fe3875b5c90aa0555c6a05 (diff) | |
download | postgresql-4faa1dc2eb02ba67303110e025d44abb40b12725.tar.gz postgresql-4faa1dc2eb02ba67303110e025d44abb40b12725.zip |
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
Diffstat (limited to 'src/include/lib')
-rw-r--r-- | src/include/lib/dshash.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/lib/dshash.h b/src/include/lib/dshash.h index 3fd91f86977..362871bfe01 100644 --- a/src/include/lib/dshash.h +++ b/src/include/lib/dshash.h @@ -39,7 +39,7 @@ typedef dshash_hash (*dshash_hash_function) (const void *v, size_t size, * members tranche_id and tranche_name do not need to be initialized when * attaching to an existing hash table. * - * Compare and hash functions mus be supplied even when attaching, because we + * Compare and hash functions must be supplied even when attaching, because we * can't safely share function pointers between backends in general. Either * the arg variants or the non-arg variants should be supplied; the other * function pointers should be NULL. If the arg varants are supplied then the |