From ccd84f48f4008bf8e0cc7758b595abcd8cf1a380 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Sat, 27 Jul 2024 17:01:14 +0800 Subject: [PATCH] make it compile --- include/common/tmsg.h | 2 +- source/common/src/tmsg.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index f0afff206c..4830593616 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -3636,7 +3636,7 @@ static FORCE_INLINE void tqOffsetResetToLog(STqOffsetVal* pOffsetVal, int64_t ve int32_t tEncodeSTqOffsetVal(SEncoder* pEncoder, const STqOffsetVal* pOffsetVal); int32_t tDecodeSTqOffsetVal(SDecoder* pDecoder, STqOffsetVal* pOffsetVal); -void tFormatOffset(char* buf, int32_t maxLen, const STqOffsetVal* pVal); +int32_t tFormatOffset(char* buf, int32_t maxLen, const STqOffsetVal* pVal); bool tOffsetEqual(const STqOffsetVal* pLeft, const STqOffsetVal* pRight); int32_t tOffsetCopy(STqOffsetVal* pLeft, const STqOffsetVal* pRight); void tOffsetDestroy(void* pVal); diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index dc43931d6b..c17b8ef526 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -9180,7 +9180,7 @@ int32_t tDecodeSTqOffsetVal(SDecoder *pDecoder, STqOffsetVal *pOffsetVal) { return 0; } -void tFormatOffset(char *buf, int32_t maxLen, const STqOffsetVal *pVal) { +int32_t tFormatOffset(char *buf, int32_t maxLen, const STqOffsetVal *pVal) { if (pVal->type == TMQ_OFFSET__RESET_NONE) { (void)snprintf(buf, maxLen, "none"); } else if (pVal->type == TMQ_OFFSET__RESET_EARLIEST) { @@ -9202,6 +9202,8 @@ void tFormatOffset(char *buf, int32_t maxLen, const STqOffsetVal *pVal) { pVal->primaryKey.type, pVal->primaryKey.val); } } + + return 0; } bool tOffsetEqual(const STqOffsetVal *pLeft, const STqOffsetVal *pRight) {