From 547fa46ae75b130588588bd0d8e6532c7e05697e Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Sun, 13 Dec 2020 23:29:08 +0800 Subject: [PATCH] fix compile errors --- cmake/define.inc | 2 +- src/plugins/http/src/httpServer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/define.inc b/cmake/define.inc index 0c7714c03e..5d4d94ff42 100755 --- a/cmake/define.inc +++ b/cmake/define.inc @@ -106,7 +106,7 @@ IF (TD_LINUX) ENDIF () SET(DEBUG_FLAGS "-O0 -g3 -DDEBUG") - SET(RELEASE_FLAGS "-Og -Wno-unused-result -Wno-unused-variable -Wno-unused-but-set-variable -Wno-format-truncation -Wno-maybe-uninitialized -Wno-format-overflow") + SET(RELEASE_FLAGS "-O3 -Wno-error") IF (${COVER} MATCHES "true") MESSAGE(STATUS "Test coverage mode, add extra flags") diff --git a/src/plugins/http/src/httpServer.c b/src/plugins/http/src/httpServer.c index 1d6c9c2a7e..4896d50c6c 100644 --- a/src/plugins/http/src/httpServer.c +++ b/src/plugins/http/src/httpServer.c @@ -256,7 +256,7 @@ bool httpInitConnect() { HttpThread *pThread = pServer->pThreads; for (int32_t i = 0; i < pServer->numOfThreads; ++i) { - snprintf(pThread->label, HTTP_LABEL_SIZE, "%s%d", pServer->label, i); + sprintf(pThread->label, "%s%d", pServer->label, i); pThread->processData = pServer->processData; pThread->threadId = i; -- GitLab