From b3c5e5a66ddb2e7350ed3aabb411297a00bf65ee Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Mon, 3 Mar 2025 18:29:10 +0800 Subject: [PATCH] fix: double decode compiler issue --- source/libs/nodes/src/nodesMsgFuncs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/libs/nodes/src/nodesMsgFuncs.c b/source/libs/nodes/src/nodesMsgFuncs.c index 1becd07aba..11381875c9 100644 --- a/source/libs/nodes/src/nodesMsgFuncs.c +++ b/source/libs/nodes/src/nodesMsgFuncs.c @@ -425,8 +425,8 @@ static int32_t tlvDecodeValueU64(STlvDecoder* pDecoder, uint64_t* pValue) { } static int32_t tlvDecodeDouble(STlv* pTlv, double* pValue) { - int64_t temp = 0; - int32_t code = tlvDecodeI64(pTlv, &temp); + volatile int64_t temp = 0; + int32_t code = tlvDecodeI64(pTlv, (int64_t*)&temp); if (TSDB_CODE_SUCCESS == code) { *pValue = *(double*)&temp; } @@ -434,8 +434,8 @@ static int32_t tlvDecodeDouble(STlv* pTlv, double* pValue) { } static int32_t tlvDecodeValueDouble(STlvDecoder* pDecoder, double* pValue) { - int64_t temp = 0; - int32_t code = tlvDecodeValueI64(pDecoder, &temp); + volatile int64_t temp = 0; + int32_t code = tlvDecodeValueI64(pDecoder, (int64_t*)&temp); if (TSDB_CODE_SUCCESS == code) { *pValue = *(double*)&temp; }