提交 cbd3228f 编写于 作者: S slguan

remove some warnings

上级 a5a3fb8f
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
** The following is the concatenation of all %include directives from the ** The following is the concatenation of all %include directives from the
** input grammar file: ** input grammar file:
*/ */
#pragma GCC diagnostic ignored "-Wunused-variable"
#include <stdio.h> #include <stdio.h>
/************ Begin %include sections from the grammar ************************/ /************ Begin %include sections from the grammar ************************/
......
...@@ -211,7 +211,6 @@ void tscGetConnToMgmt(SSqlObj *pSql, uint8_t *pCode) { ...@@ -211,7 +211,6 @@ void tscGetConnToMgmt(SSqlObj *pSql, uint8_t *pCode) {
} }
void tscGetConnToVnode(SSqlObj *pSql, uint8_t *pCode) { void tscGetConnToVnode(SSqlObj *pSql, uint8_t *pCode) {
char ipstr[40] = {0};
SVPeerDesc *pVPeersDesc = NULL; SVPeerDesc *pVPeersDesc = NULL;
static int vidIndex = 0; static int vidIndex = 0;
STscObj * pTscObj = pSql->pTscObj; STscObj * pTscObj = pSql->pTscObj;
...@@ -244,6 +243,7 @@ void tscGetConnToVnode(SSqlObj *pSql, uint8_t *pCode) { ...@@ -244,6 +243,7 @@ void tscGetConnToVnode(SSqlObj *pSql, uint8_t *pCode) {
while (pSql->retry < pSql->maxRetry) { while (pSql->retry < pSql->maxRetry) {
(pSql->retry)++; (pSql->retry)++;
#ifdef CLUSTER #ifdef CLUSTER
char ipstr[40] = {0};
if (pVPeersDesc[pSql->index].ip == 0) { if (pVPeersDesc[pSql->index].ip == 0) {
(pSql->index) = (pSql->index + 1) % TSDB_VNODES_SUPPORT; (pSql->index) = (pSql->index + 1) % TSDB_VNODES_SUPPORT;
continue; continue;
......
...@@ -403,21 +403,29 @@ void monitorSaveAcctLog(char *acctId, int64_t currentPointsPerSecond, int64_t ma ...@@ -403,21 +403,29 @@ void monitorSaveAcctLog(char *acctId, int64_t currentPointsPerSecond, int64_t ma
char sql[1024] = {0}; char sql[1024] = {0};
sprintf(sql, sprintf(sql,
"insert into %s.acct_%s using %s.acct tags('%s') values(now" "insert into %s.acct_%s using %s.acct tags('%s') values(now"
", %" PRId64, "%" PRId64 ", %" PRId64 ", %" PRId64
", %" PRId64, "%" PRId64 ", %" PRId64 ", %" PRId64
", %" PRId64, "%" PRId64 ", %" PRId64 ", %" PRId64
", %" PRId64, "%" PRId64 ", %" PRId64 ", %" PRId64
", %" PRId64, "%" PRId64 ", %" PRId64 ", %" PRId64
", %" PRId64, "%" PRId64 ", %" PRId64 ", %" PRId64
", %" PRId64, "%" PRId64 ", %" PRId64 ", %" PRId64
", %" PRId64, "%" PRId64 ", %" PRId64 ", %" PRId64
", %" PRId64, "%" PRId64 ", %" PRId64 ", %" PRId64
", %" PRId64, "%" PRId64 ", %" PRId64 ", %" PRId64
", %d)", ", %d)",
tsMonitorDbName, acctId, tsMonitorDbName, acctId, currentPointsPerSecond, maxPointsPerSecond, totalTimeSeries, tsMonitorDbName, acctId, tsMonitorDbName, acctId,
maxTimeSeries, totalStorage, maxStorage, totalQueryTime, maxQueryTime, totalInbound, maxInbound, currentPointsPerSecond, maxPointsPerSecond,
totalOutbound, maxOutbound, totalDbs, maxDbs, totalUsers, maxUsers, totalStreams, maxStreams, totalConns, totalTimeSeries, maxTimeSeries,
maxConns, accessState); totalStorage, maxStorage,
totalQueryTime, maxQueryTime,
totalInbound, maxInbound,
totalOutbound, maxOutbound,
totalDbs, maxDbs,
totalUsers, maxUsers,
totalStreams, maxStreams,
totalConns, maxConns,
accessState);
monitorTrace("monitor:%p, save account info, sql %s", monitor->conn, sql); monitorTrace("monitor:%p, save account info, sql %s", monitor->conn, sql);
taos_query_a(monitor->conn, sql, dnodeMontiorInsertAcctCallback, "account"); taos_query_a(monitor->conn, sql, dnodeMontiorInsertAcctCallback, "account");
...@@ -432,7 +440,7 @@ void monitorSaveLog(int level, const char *const format, ...) { ...@@ -432,7 +440,7 @@ void monitorSaveLog(int level, const char *const format, ...) {
return; return;
} }
int len = snprintf(sql, (size_t)max_length, "import into %s.log values(%\" PRId64 \", %d,'", tsMonitorDbName, int len = snprintf(sql, (size_t)max_length, "import into %s.log values(%" PRId64 ", %d,'", tsMonitorDbName,
taosGetTimestampUs(), level); taosGetTimestampUs(), level);
va_start(argpointer, format); va_start(argpointer, format);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册