Re: Fix warnings and typo in dshash

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fix warnings and typo in dshash
Date: 2017-09-03 14:13:14
Message-ID: 5327.1504447994@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> writes:
> I am seeing below warnings (on Win7) in dshash.c
> 1> dshash.c
> 1>src/backend/lib/dshash.c(318): warning C4334: '<<' : result of
> 32-bit shift implicitly converted to 64 bits (was 64-bit shift
> intended?)
> 1>src/backend/lib/dshash.c(679): warning C4334: '<<' : result of
> 32-bit shift implicitly converted to 64 bits (was 64-bit shift
> intended?)
> 1>src/backend/lib/dshash.c(713): warning C4334: '<<' : result of
> 32-bit shift implicitly converted to 64 bits (was 64-bit shift
> intended?)

> Attached a patch to fix the above warning.

That will just make for different warnings on 32-bit machines.
Perhaps casting to size_t is appropriate here.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-09-03 14:36:36 Re: Fix warnings and typo in dshash
Previous Message Tom Lane 2017-09-03 14:11:37 Re: JIT & function naming