deal warning

Signed-off-by: shipixian <shipixian_yewu@cmss.chinamobile.com>
This commit is contained in:
shipixian 2023-05-04 16:12:28 +08:00
parent 8e128c64e0
commit 41625f37ac
6 changed files with 12 additions and 8 deletions

View File

@ -1931,8 +1931,6 @@ err:
// return true;
// }
int
He3DBWALRead(XLogReaderState *state,
XLogRecPtr startptr, int count, char *buf)
@ -1954,7 +1952,6 @@ He3DBWALRead(XLogReaderState *state,
return nbytes;
}
/* ----------------------------------------
* Functions for decoding the data and block references in a record.
* ----------------------------------------

View File

@ -1160,7 +1160,7 @@ XLogTruncateRelation(RelFileNode rnode, ForkNumber forkNum,
int
read_local_xlog_batch(XLogReaderState *state,
int reqLen, XLogRecPtr targetRecPtr, char *cur_page)
XLogRecPtr targetRecPtr, int reqLen, char *cur_page)
{
XLogRecPtr read_upto,
loc;

View File

@ -683,7 +683,7 @@ void mdread(SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum,
pageKey.blkNo = blocknum;
pageKey.pageLsn = PageGetLSN(buffer);
pageKey.replyLsn = 0;
ReceivePageFromDataBuffer(&pageKey, buffer);
ReceivePageFromDataBuffer(&pageKey, (uin8_t *)buffer);
}
}

View File

@ -57,7 +57,7 @@ typedef struct f_smgr
BlockNumber blocknum, char *buffer, bool skipFsync);
bool (*smgr_prefetch) (SMgrRelation reln, ForkNumber forknum,
BlockNumber blocknum);
int (*smgr_read) (SMgrRelation reln, ForkNumber forknum,
void (*smgr_read) (SMgrRelation reln, ForkNumber forknum,
BlockNumber blocknum, char *buffer);
void (*smgr_write) (SMgrRelation reln, ForkNumber forknum,
BlockNumber blocknum, char *buffer, bool skipFsync);
@ -581,7 +581,7 @@ smgrwrite(SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum,
if (push_standby || he3mirror) {
smgrsw[reln->smgr_which].smgr_write(reln, forknum, blocknum, buffer, skipFsync);
} else {
ReceivePageFromDataBuffer(&pageKey,buffer);
ReceivePageFromDataBuffer(&pageKey, (uint8_t *) buffer);
}
}
else

View File

@ -251,6 +251,12 @@ pgstat_get_wait_activity(WaitEventActivity w)
case WAIT_EVENT_PAGEFLUSH_MAIN:
event_name = "PageFlushMain";
break;
case WAIT_EVENT_CLEAN_LOGINDEX_MAIN:
event_name = "CleanLogindexMain";
break;
case WAIT_EVENT_SECONDBUFFER_MAIN:
event_name = "SecondBufferMain";
break;
/* no default case, so that compiler will warn */
}

View File

@ -61,8 +61,9 @@ extern int read_local_xlog_page(XLogReaderState *state,
XLogRecPtr targetPagePtr, int reqLen,
XLogRecPtr targetRecPtr, char *cur_page);
extern int read_local_xlog_batch(XLogReaderState *state,
XLogRecPtr startRecPtr,
int reqLen,
XLogRecPtr startRecPtr, char *cur_page);
char *cur_page);
extern void wal_segment_open(XLogReaderState *state,
XLogSegNo nextSegNo,
TimeLineID *tli_p);