Re: Fix warnings and typo in dshash
Thomas Munro <thomas.munro@enterprisedb.com>
From: Thomas Munro <thomas.munro@enterprisedb.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2017-09-03T09:26:15Z
Lists: pgsql-hackers
Attachments
- fix_warning.patch (application/octet-stream) patch
On Sun, Sep 3, 2017 at 6:57 PM, Amit Kapila <amit.kapila16@gmail.com> wrote: > 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?) Thanks! That's a handy warning to have. I see that it is also visible on the build farm: https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=caecilian&dt=2017-09-02%2019%3A30%3A30&stg=make Aside from these 3 warnings, it looks like the other 17 are all "warning C4005: 'HAVE_LONG_LONG_INT_64': macro redefinition". I wonder if it would make sense to fix that too and then turn on the MSVC equivalent of -Werror=xxx on a build farm animal... > Attached a patch to fix the above warning. I think it should be (size_t) 1, not UINT64CONST(1). See attached. > I have noticed a typo in dshash.h for which a separate patch is attached. +1 -- Thomas Munro http://www.enterprisedb.com
Commits
-
Minor clean-up in dshash.{c,h}.
- 17b340abf83d 11.0 landed
-
Suppress compiler warnings in dshash.c.
- 4faa1dc2eb02 11.0 landed
-
Fix macro-redefinition warning on MSVC.
- e451901804bd 11.0 landed
- d5c65d2f11ac 10.0 landed
- a64a0bfaae0c 9.2.24 landed
- a4b0a4d437dc 9.6.6 landed
- a42f8d979299 9.3.20 landed
- 1d30553aa235 9.5.10 landed
- 143fcf90b158 9.4.15 landed