fix: double decode compiler issue

This commit is contained in:
dapan1121 2025-03-03 18:29:10 +08:00
parent a140fb486d
commit b3c5e5a66d
1 changed files with 4 additions and 4 deletions

View File

@ -425,8 +425,8 @@ static int32_t tlvDecodeValueU64(STlvDecoder* pDecoder, uint64_t* pValue) {
} }
static int32_t tlvDecodeDouble(STlv* pTlv, double* pValue) { static int32_t tlvDecodeDouble(STlv* pTlv, double* pValue) {
int64_t temp = 0; volatile int64_t temp = 0;
int32_t code = tlvDecodeI64(pTlv, &temp); int32_t code = tlvDecodeI64(pTlv, (int64_t*)&temp);
if (TSDB_CODE_SUCCESS == code) { if (TSDB_CODE_SUCCESS == code) {
*pValue = *(double*)&temp; *pValue = *(double*)&temp;
} }
@ -434,8 +434,8 @@ static int32_t tlvDecodeDouble(STlv* pTlv, double* pValue) {
} }
static int32_t tlvDecodeValueDouble(STlvDecoder* pDecoder, double* pValue) { static int32_t tlvDecodeValueDouble(STlvDecoder* pDecoder, double* pValue) {
int64_t temp = 0; volatile int64_t temp = 0;
int32_t code = tlvDecodeValueI64(pDecoder, &temp); int32_t code = tlvDecodeValueI64(pDecoder, (int64_t*)&temp);
if (TSDB_CODE_SUCCESS == code) { if (TSDB_CODE_SUCCESS == code) {
*pValue = *(double*)&temp; *pValue = *(double*)&temp;
} }