diff --git a/src/plugins/http/src/httpGcJson.c b/src/plugins/http/src/httpGcJson.c index d50a38201f8d1b6c64e4dee6a25fdf47fec48dd6..80e4ae3bc2b51387d5573af00aa1e91d2c1cd663 100644 --- a/src/plugins/http/src/httpGcJson.c +++ b/src/plugins/http/src/httpGcJson.c @@ -210,7 +210,7 @@ bool gcBuildQueryJson(HttpContext *pContext, HttpSqlCmd *cmd, TAOS_RES *result, httpJsonInt64(jsonBuf, *((int64_t *)row[i])); break; case TSDB_DATA_TYPE_FLOAT: - httpJsonFloat(jsonBuf, *((float *)row[i])); + httpJsonFloat(jsonBuf, GET_FLOAT_VAL(row[i])); break; case TSDB_DATA_TYPE_DOUBLE: httpJsonDouble(jsonBuf, GET_DOUBLE_VAL(row[i])); diff --git a/tests/tsim/src/simExe.c b/tests/tsim/src/simExe.c index 4048f583622fc7b8d4258a0dde3cfc56ed03351d..7f786dfaa9de5f6a93d3a181ddd53e37e8694310 100644 --- a/tests/tsim/src/simExe.c +++ b/tests/tsim/src/simExe.c @@ -739,13 +739,13 @@ bool simExecuteNativeSqlCommand(SScript *script, char *rest, bool isSlow) { ((((int)(*((char *)row[i]))) == 1) ? "1" : "0")); break; case TSDB_DATA_TYPE_TINYINT: - sprintf(value, "%d", (int)(*((char *)row[i]))); + sprintf(value, "%d", *((int8_t *)row[i])); break; case TSDB_DATA_TYPE_SMALLINT: - sprintf(value, "%d", (int)(*((short *)row[i]))); + sprintf(value, "%d", *((int16_t *)row[i])); break; case TSDB_DATA_TYPE_INT: - sprintf(value, "%d", *((int *)row[i])); + sprintf(value, "%d", *((int32_t *)row[i])); break; case TSDB_DATA_TYPE_BIGINT: sprintf(value, "%" PRId64, *((int64_t *)row[i]));