diff --git a/meson.build b/meson.build index 7f82876dbc8..60c8cdc3a06 100644 --- a/meson.build +++ b/meson.build @@ -2331,6 +2331,10 @@ if cc.get_id() == 'msvc' '/w24062', # enumerator 'identifier' in switch of enum 'enumeration' is not handled [like -Wswitch] '/w24102', # unreferenced label [like -Wunused-label] + # This one doesn't match a gcc warning, but it can help catch + # issues related to 4-byte long on Windows. + '/w24334', # 'operator': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) + # Turn this into an error, to match other compilers (as of C99) '/we4013', # 'function' undefined; assuming extern returning int' [like -Wimplicit-function-declaration] ] diff --git a/src/backend/utils/hash/dynahash.c b/src/backend/utils/hash/dynahash.c index 20610f96e7b..dc7ae64a5a9 100644 --- a/src/backend/utils/hash/dynahash.c +++ b/src/backend/utils/hash/dynahash.c @@ -1764,7 +1764,7 @@ static int64 next_pow2_int64(int64 num) { /* my_log2's internal range check is sufficient */ - return 1L << my_log2(num); + return INT64CONST(1) << my_log2(num); } /* calculate first power of 2 >= num, bounded to what will fit in an int */