From 9a8eff2a0e9e586e6a2a19e3033862db86c4e6dc Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Fri, 12 Apr 2024 13:04:47 +0800 Subject: [PATCH] fix:compile error --- include/util/tencode.h | 2 +- source/common/src/tmsg.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/util/tencode.h b/include/util/tencode.h index 0b523ddfa2..596fa2b4d3 100644 --- a/include/util/tencode.h +++ b/include/util/tencode.h @@ -432,7 +432,7 @@ static FORCE_INLINE int32_t tDecodeBinaryAlloc(SDecoder* pCoder, void** val, uin return 0; } -static FORCE_INLINE int32_t tDecodeBinaryAlloc32(SDecoder* pCoder, uint8_t** val, uint32_t* len) { +static FORCE_INLINE int32_t tDecodeBinaryAlloc32(SDecoder* pCoder, void** val, uint32_t* len) { uint32_t length = 0; if (tDecodeU32v(pCoder, &length) < 0) return -1; if (length) { diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 2705c6d5dc..a38b745db8 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -8707,7 +8707,7 @@ int32_t tDecodeSTqOffsetVal(SDecoder *pDecoder, STqOffsetVal *pOffsetVal) { if (offsetVersion >= TQ_OFFSET_VERSION) { if (tDecodeI8(pDecoder, &pOffsetVal->primaryKey.type) < 0) return -1; if (IS_VAR_DATA_TYPE(pOffsetVal->primaryKey.type)){ - if (tDecodeBinaryAlloc32(pDecoder, &pOffsetVal->primaryKey.pData, &pOffsetVal->primaryKey.nData) < 0) return -1; + if (tDecodeBinaryAlloc32(pDecoder, (void**)&pOffsetVal->primaryKey.pData, &pOffsetVal->primaryKey.nData) < 0) return -1; } else { if (tDecodeI64(pDecoder, &pOffsetVal->primaryKey.val) < 0) return -1; }