From e5443631062710ce55527b3d363963359db372d3 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Tue, 15 Sep 2020 18:56:32 +0800 Subject: [PATCH] [TD-1459] : fix compile error for release build type. --- cmake/define.inc | 2 +- src/client/src/tscSQLParser.c | 1 + src/client/src/tscUtil.c | 1 + src/query/src/qExecutor.c | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/define.inc b/cmake/define.inc index 28770be254..84df6f5405 100755 --- a/cmake/define.inc +++ b/cmake/define.inc @@ -100,7 +100,7 @@ IF (TD_LINUX) ENDIF () SET(DEBUG_FLAGS "-O0 -DDEBUG") - SET(RELEASE_FLAGS "-O0") + SET(RELEASE_FLAGS "-O0 -Wno-unused-variable -Wunused-but-set-variable") IF (${COVER} MATCHES "true") MESSAGE(STATUS "Test coverage mode, add extra flags") diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index c248b08ddd..f9f72f9174 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -5271,6 +5271,7 @@ static void doUpdateSqlFunctionForColPrj(SQueryInfo* pQueryInfo) { } assert(qualifiedCol); + qualifiedCol = qualifiedCol; } } } diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index 80e3828c9d..636fccd3a0 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -1788,6 +1788,7 @@ static void doSetSqlExprAndResultFieldInfo(SQueryInfo* pQueryInfo, SQueryInfo* p } assert(matched); + matched = matched; } tscFieldInfoUpdateOffset(pNewQueryInfo); diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index d48d7d5ea1..ed093e4143 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -5463,6 +5463,7 @@ static int32_t getColumnIndexInSource(SQueryTableMsg *pQueryMsg, SSqlFuncMsg *pE } } assert(0); + return -1; } bool validateExprColumnInfo(SQueryTableMsg *pQueryMsg, SSqlFuncMsg *pExprMsg, SColumnInfo* pTagCols) { -- GitLab