From b701665ac6db40ee49082687ceb07b73f147efc7 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Thu, 31 Oct 2024 10:29:59 +0800 Subject: [PATCH] fix: compile issue --- include/common/ttypes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/common/ttypes.h b/include/common/ttypes.h index 76c59f37bb..087e593195 100644 --- a/include/common/ttypes.h +++ b/include/common/ttypes.h @@ -241,14 +241,14 @@ typedef struct { case TSDB_DATA_TYPE_FLOAT: { \ int32_t n = snprintf(_output, (int32_t)(_outputBytes), "%f", *(float *)(_input)); \ if (n >= (_outputBytes)) { \ - snprintf(_output, (int32_t)(_outputBytes), "%*.7f", (_outputBytes) - 1, *(float *)(_input)); \ + snprintf(_output, (int32_t)(_outputBytes), "%*.7f", (int32_t)((_outputBytes) - 1), *(float *)(_input)); \ } \ break; \ } \ case TSDB_DATA_TYPE_DOUBLE: { \ int32_t n = snprintf(_output, (int32_t)(_outputBytes), "%f", *(double *)(_input)); \ if (n >= (_outputBytes)) { \ - snprintf(_output, (int32_t)(_outputBytes), "%*.7f", (_outputBytes) - 1, *(double *)(_input)); \ + snprintf(_output, (int32_t)(_outputBytes), "%*.7f", (int32_t)((_outputBytes) - 1), *(double *)(_input)); \ } \ break; \ } \