@@ -173,7 +173,7 @@ static void SnapBuildWaitSnapshot(xl_running_xacts *running, TransactionId cutof
173173/* serialization functions */
174174static void SnapBuildSerialize (SnapBuild * builder , XLogRecPtr lsn );
175175static bool SnapBuildRestore (SnapBuild * builder , XLogRecPtr lsn );
176- static void SnapBuildRestoreContents (int fd , char * dest , Size size , const char * path );
176+ static void SnapBuildRestoreContents (int fd , void * dest , Size size , const char * path );
177177
178178/*
179179 * Allocate a new snapshot builder.
@@ -1722,7 +1722,7 @@ SnapBuildRestoreSnapshot(SnapBuildOnDisk *ondisk, const char *path,
17221722 fsync_fname (PG_LOGICAL_SNAPSHOTS_DIR , true);
17231723
17241724 /* read statically sized portion of snapshot */
1725- SnapBuildRestoreContents (fd , ( char * ) ondisk , SnapBuildOnDiskConstantSize , path );
1725+ SnapBuildRestoreContents (fd , ondisk , SnapBuildOnDiskConstantSize , path );
17261726
17271727 if (ondisk -> magic != SNAPBUILD_MAGIC )
17281728 ereport (ERROR ,
@@ -1742,15 +1742,15 @@ SnapBuildRestoreSnapshot(SnapBuildOnDisk *ondisk, const char *path,
17421742 SnapBuildOnDiskConstantSize - SnapBuildOnDiskNotChecksummedSize );
17431743
17441744 /* read SnapBuild */
1745- SnapBuildRestoreContents (fd , ( char * ) & ondisk -> builder , sizeof (SnapBuild ), path );
1745+ SnapBuildRestoreContents (fd , & ondisk -> builder , sizeof (SnapBuild ), path );
17461746 COMP_CRC32C (checksum , & ondisk -> builder , sizeof (SnapBuild ));
17471747
17481748 /* restore committed xacts information */
17491749 if (ondisk -> builder .committed .xcnt > 0 )
17501750 {
17511751 sz = sizeof (TransactionId ) * ondisk -> builder .committed .xcnt ;
17521752 ondisk -> builder .committed .xip = MemoryContextAllocZero (context , sz );
1753- SnapBuildRestoreContents (fd , ( char * ) ondisk -> builder .committed .xip , sz , path );
1753+ SnapBuildRestoreContents (fd , ondisk -> builder .committed .xip , sz , path );
17541754 COMP_CRC32C (checksum , ondisk -> builder .committed .xip , sz );
17551755 }
17561756
@@ -1759,7 +1759,7 @@ SnapBuildRestoreSnapshot(SnapBuildOnDisk *ondisk, const char *path,
17591759 {
17601760 sz = sizeof (TransactionId ) * ondisk -> builder .catchange .xcnt ;
17611761 ondisk -> builder .catchange .xip = MemoryContextAllocZero (context , sz );
1762- SnapBuildRestoreContents (fd , ( char * ) ondisk -> builder .catchange .xip , sz , path );
1762+ SnapBuildRestoreContents (fd , ondisk -> builder .catchange .xip , sz , path );
17631763 COMP_CRC32C (checksum , ondisk -> builder .catchange .xip , sz );
17641764 }
17651765
@@ -1882,7 +1882,7 @@ SnapBuildRestore(SnapBuild *builder, XLogRecPtr lsn)
18821882 * Read the contents of the serialized snapshot to 'dest'.
18831883 */
18841884static void
1885- SnapBuildRestoreContents (int fd , char * dest , Size size , const char * path )
1885+ SnapBuildRestoreContents (int fd , void * dest , Size size , const char * path )
18861886{
18871887 int readBytes ;
18881888
0 commit comments