will fix,

A blind attempt, if it helps.

The 32-bit members of the buildfarm aren't very happy with this,
eg on dromedary:

cache gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -ansi -I. -I. -I../../../src/interfaces/libpq -I../../../src/include -DCOPY_PARSE_PLAN_TREES -DRAW_EXPRESSION_COVERAGE_TEST -c -o command.o command.c
pgbench.c: In function 'getHashFnv1a':
pgbench.c:945: warning: integer constant is too large for 'long' type
pgbench.c:952: warning: integer constant is too large for 'long' type
pgbench.c: In function 'getHashMurmur2':
pgbench.c:967: warning: integer constant is too large for 'long' type
pgbench.c:970: warning: integer constant is too large for 'long' type
pgbench.c:972: warning: integer constant is too large for 'long' type
pgbench.c:975: warning: integer constant is too large for 'long' type
pgbench.c:978: warning: integer constant is too large for 'long' type

Looks to me like the constants need to be written with INT64CONST().
Also, the fact that the added regression test is passing makes me
wonder whether it's actually exercising these functions meaningfully.

I think that there is at least some coverage (https://coverage.postgresql.org/src/bin/pgbench/pgbench.c.gcov.html) and the function results are also checked for some values in the perl script output.

--
Fabien.
diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c
index 894571e..5e88192 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -64,9 +64,9 @@
 /*
  * Hashing constants
  */
-#define FNV_PRIME 0x100000001b3
-#define FNV_OFFSET_BASIS 0xcbf29ce484222325
-#define MM2_MUL 0xc6a4a7935bd1e995
+#define FNV_PRIME INT64CONST(0x100000001b3)
+#define FNV_OFFSET_BASIS INT64CONST(0xcbf29ce484222325)
+#define MM2_MUL INT64CONST(0xc6a4a7935bd1e995)
 #define MM2_ROT 47
 
 /*

Reply via email to