diff --git a/source/libs/wal/src/walRead.c b/source/libs/wal/src/walRead.c index 38c14895d8c62d19065911cb50b5bfc5fc7e46c0..a0c65c8ed6f0ced28f7e2e329a5f501e2c8f5be7 100644 --- a/source/libs/wal/src/walRead.c +++ b/source/libs/wal/src/walRead.c @@ -75,7 +75,7 @@ static int32_t walReadSeekFilePos(SWalReadHandle *pRead, int64_t fileFirstVer, i wError("failed to read idx file, since %s", terrstr()); } else { terrno = TSDB_CODE_WAL_FILE_CORRUPTED; - wError("read idx file incompletely, read bytes %d, bytes should be %lu", ret, sizeof(SWalIdxEntry)); + wError("read idx file incompletely, read bytes %ld, bytes should be %lu", ret, sizeof(SWalIdxEntry)); } return -1; } @@ -187,7 +187,7 @@ int32_t walFetchHead(SWalReadHandle *pRead, int64_t ver, SWalHead *pHead) { } int32_t walSkipFetchBody(SWalReadHandle *pRead, const SWalHead *pHead) { - int32_t code; + int64_t code; ASSERT(pRead->curVersion == pHead->head.version); diff --git a/source/libs/wal/src/walWrite.c b/source/libs/wal/src/walWrite.c index 2e439975849fd38adc7e77ed061af4219bc1fd73..2ddcb27835b5276026d46ff2d46150b7fc9995a7 100644 --- a/source/libs/wal/src/walWrite.c +++ b/source/libs/wal/src/walWrite.c @@ -30,8 +30,8 @@ int32_t walCommit(SWal *pWal, int64_t ver) { } int32_t walRollback(SWal *pWal, int64_t ver) { - int code; - char fnameStr[WAL_FILE_LEN]; + int64_t code; + char fnameStr[WAL_FILE_LEN]; if (ver > pWal->vers.lastVer || ver < pWal->vers.commitVer) { terrno = TSDB_CODE_WAL_INVALID_VER; return -1;