Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb2328bf

Browse files
committed
Fix some assorted compiler warnings on Windows.
Don't overflow the result type of constant expressions. Don't negateunsigned types. Define HAVE_STDBOOL_H for Visual C++ 2013 and later.Thomas MunroReviewed-By: Michael Paquier and Tom LaneDiscussion:https://postgr.es/m/CAEepm%3D3%3DTDYEXUEcHpEx%2BTwc31wo7PA0oBAiNt6sWmq93MW02A%40mail.gmail.com
1 parent41c912c commitb2328bf

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

‎src/backend/replication/basebackup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1361,7 +1361,7 @@ sendFile(const char *readfilename, const char *tarfilename, struct stat *statbuf
13611361
charbuf[TAR_SEND_SIZE];
13621362
uint16checksum;
13631363
intchecksum_failures=0;
1364-
size_tcnt;
1364+
off_tcnt;
13651365
inti;
13661366
pgoff_tlen=0;
13671367
char*page;

‎src/bin/pgbench/pgbench.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
#defineFNV_PRIMEUINT64CONST(0x100000001b3)
6868
#defineFNV_OFFSET_BASISUINT64CONST(0xcbf29ce484222325)
6969
#defineMM2_MULUINT64CONST(0xc6a4a7935bd1e995)
70+
#defineMM2_MUL_TIMES_8UINT64CONST(0x35253c9ade8f4ca8)
7071
#defineMM2_ROT47
7172

7273
/*
@@ -968,7 +969,7 @@ getHashFnv1a(int64 val, uint64 seed)
968969
staticint64
969970
getHashMurmur2(int64val,uint64seed)
970971
{
971-
uint64result=seed ^(sizeof(int64)*MM2_MUL);
972+
uint64result=seed ^MM2_MUL_TIMES_8;/*sizeof(int64) */
972973
uint64k= (uint64)val;
973974

974975
k *=MM2_MUL;

‎src/include/pg_config.h.win32

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,9 @@
357357
#define HAVE_SSL_GET_CURRENT_COMPRESSION 1
358358

359359
/* Define to 1 if stdbool.h conforms to C99. */
360-
/* #undef HAVE_STDBOOL_H */
360+
#if (_MSC_VER >= 1800)
361+
#define HAVE_STDBOOL_H 1
362+
#endif
361363

362364
/* Define to 1 if you have the <stdint.h> header file. */
363365
/* #undef HAVE_STDINT_H */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp