mirror of
https://github.com/postgres/postgres.git
synced 2025-04-25 21:42:33 +03:00
Fix some assorted compiler warnings on Windows.
Don't overflow the result type of constant expressions. Don't negate unsigned types. Define HAVE_STDBOOL_H for Visual C++ 2013 and later. Thomas Munro Reviewed-By: Michael Paquier and Tom Lane Discussion: https://postgr.es/m/CAEepm%3D3%3DTDYEXUEcHpEx%2BTwc31wo7PA0oBAiNt6sWmq93MW02A%40mail.gmail.com
This commit is contained in:
parent
41c912cad1
commit
b2328bf62b
@ -1361,7 +1361,7 @@ sendFile(const char *readfilename, const char *tarfilename, struct stat *statbuf
|
||||
char buf[TAR_SEND_SIZE];
|
||||
uint16 checksum;
|
||||
int checksum_failures = 0;
|
||||
size_t cnt;
|
||||
off_t cnt;
|
||||
int i;
|
||||
pgoff_t len = 0;
|
||||
char *page;
|
||||
|
@ -67,6 +67,7 @@
|
||||
#define FNV_PRIME UINT64CONST(0x100000001b3)
|
||||
#define FNV_OFFSET_BASIS UINT64CONST(0xcbf29ce484222325)
|
||||
#define MM2_MUL UINT64CONST(0xc6a4a7935bd1e995)
|
||||
#define MM2_MUL_TIMES_8 UINT64CONST(0x35253c9ade8f4ca8)
|
||||
#define MM2_ROT 47
|
||||
|
||||
/*
|
||||
@ -968,7 +969,7 @@ getHashFnv1a(int64 val, uint64 seed)
|
||||
static int64
|
||||
getHashMurmur2(int64 val, uint64 seed)
|
||||
{
|
||||
uint64 result = seed ^ (sizeof(int64) * MM2_MUL);
|
||||
uint64 result = seed ^ MM2_MUL_TIMES_8; /* sizeof(int64) */
|
||||
uint64 k = (uint64) val;
|
||||
|
||||
k *= MM2_MUL;
|
||||
|
@ -357,7 +357,9 @@
|
||||
#define HAVE_SSL_GET_CURRENT_COMPRESSION 1
|
||||
|
||||
/* Define to 1 if stdbool.h conforms to C99. */
|
||||
/* #undef HAVE_STDBOOL_H */
|
||||
#if (_MSC_VER >= 1800)
|
||||
#define HAVE_STDBOOL_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
/* #undef HAVE_STDINT_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user