Fix 64-bit shifting in dynahash.c
Peter Eisentraut <peter@eisentraut.org>
Author:
Peter Eisentraut <peter@eisentraut.org>
Date: 2026-04-19T11:27:54Z
Releases:
19 (unreleased)
Fix 64-bit shifting in dynahash.c The switch from long to int64 in commit 13b935cd521 was incomplete. It was shifting the constant 1L, which is not always 64 bit. Fix by using an explicit int64 constant. MSVC warning: ../src/backend/utils/hash/dynahash.c(1767): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) Also add the corresponding warning to the standard warning set on MSVC, to help catch similar issues in the future. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/1142ad86-e475-41b3-aeee-c6ad913064fa%40eisentraut.org
Files
| Path | Change | +/− |
|---|---|---|
| meson.build | modified | +4 −0 |
| src/backend/utils/hash/dynahash.c | modified | +1 −1 |
Discussion
- some extra warnings from MSVC 3 messages · 2026-04-11 → 2026-04-19