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

Commit94019c8

Browse files
committed
Fix more portability issues with casts to Size when using off_t
This should tame the beast, as there are no other places where off_t isused in the new error messages.Reported again by longfin, which complained about walsender.c while Ispotted the other two ones while double-checking.
1 parent8bd064f commit94019c8

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

‎src/backend/replication/logical/snapbuild.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1737,7 +1737,8 @@ SnapBuildRestore(SnapBuild *builder, XLogRecPtr lsn)
17371737
else
17381738
ereport(ERROR,
17391739
(errmsg("could not read file \"%s\": read %d of %zu",
1740-
path,readBytes,SnapBuildOnDiskConstantSize)));
1740+
path,readBytes,
1741+
(Size)SnapBuildOnDiskConstantSize)));
17411742
}
17421743

17431744
if (ondisk.magic!=SNAPBUILD_MAGIC)

‎src/backend/replication/slot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1422,7 +1422,7 @@ RestoreSlotFromDisk(const char *name)
14221422
ereport(PANIC,
14231423
(errmsg("could not read file \"%s\": read %d of %zu",
14241424
path,readBytes,
1425-
ReplicationSlotOnDiskConstantSize)));
1425+
(Size)ReplicationSlotOnDiskConstantSize)));
14261426
}
14271427

14281428
/* verify magic */

‎src/backend/replication/walsender.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ SendTimeLineHistory(TimeLineHistoryCmd *cmd)
509509
elseif (nread==0)
510510
ereport(ERROR,
511511
(errmsg("could not read file \"%s\": read %d of %zu",
512-
path,nread,bytesleft)));
512+
path,nread,(Size)bytesleft)));
513513

514514
pq_sendbytes(&buf,rbuf,nread);
515515
bytesleft-=nread;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp