[TBASE-1299]
This commit is contained in:
parent
5ff6e6337c
commit
5ef542368e
|
@ -13,8 +13,6 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
|
||||
|
||||
#include "os.h"
|
||||
#include "taosmsg.h"
|
||||
#include "tast.h"
|
||||
|
|
|
@ -18,9 +18,6 @@
|
|||
|
||||
#define _XOPEN_SOURCE
|
||||
|
||||
#pragma GCC diagnostic ignored "-Woverflow"
|
||||
#pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
|
||||
#include "os.h"
|
||||
#include "ihash.h"
|
||||
#include "tscSecondaryMerge.h"
|
||||
|
|
|
@ -28,8 +28,6 @@
|
|||
#include "tsclient.h"
|
||||
#include "tscSQLParser.h"
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
|
||||
#define DEFAULT_PRIMARY_TIMESTAMP_COL_NAME "_c0"
|
||||
|
||||
// -1 is tbname column index, so here use the -2 as the initial value
|
||||
|
|
|
@ -419,7 +419,7 @@ void mgmtCleanupBalance();
|
|||
int mgmtAllocVnodes(SVgObj *pVgroup);
|
||||
void mgmtSetDnodeShellRemoving(SDnodeObj *pDnode);
|
||||
void mgmtSetDnodeUnRemove(SDnodeObj *pDnode);
|
||||
void mgmtStartBalanceTimer(int mseconds);
|
||||
void mgmtStartBalanceTimer(int64_t mseconds);
|
||||
void mgmtSetDnodeOfflineOnSdbChanged();
|
||||
void mgmtUpdateVgroupState(SVgObj *pVgroup, int lbStatus, int srcIp);
|
||||
bool mgmtAddVnode(SVgObj *pVgroup, SDnodeObj *pSrcDnode, SDnodeObj *pDestDnode);
|
||||
|
|
|
@ -1363,5 +1363,3 @@ void mgmtInitProcessShellMsg() {
|
|||
mgmtProcessShellMsg[TSDB_MSG_TYPE_KILL_STREAM] = mgmtProcessKillStreamMsg;
|
||||
mgmtProcessShellMsg[TSDB_MSG_TYPE_KILL_CONNECTION] = mgmtProcessKillConnectionMsg;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
|
|
@ -50,7 +50,7 @@ char *taosBuildReqMsgToMnode(SMgmtObj *pObj, char type) {
|
|||
}
|
||||
|
||||
int taosSendMsgToMnode(SMgmtObj *pObj, char *msg, int msgLen) {
|
||||
dTrace("msg:%s is sent to mnode", taosMsg[*(msg-1)]);
|
||||
dTrace("msg:%s is sent to mnode", taosMsg[(uint8_t)(*(msg-1))]);
|
||||
|
||||
/*
|
||||
* Lite version has no message header, so minus one
|
||||
|
@ -81,7 +81,7 @@ void vnodeProcessMsgFromMgmtSpec(SSchedMsg *sched) {
|
|||
char msgType = *sched->msg;
|
||||
char *content = sched->msg + 1;
|
||||
|
||||
dTrace("msg:%s is received from mgmt", taosMsg[msgType]);
|
||||
dTrace("msg:%s is received from mgmt", taosMsg[(uint8_t)msgType]);
|
||||
|
||||
vnodeProcessMsgFromMgmt(content, 0, msgType, 0);
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "mgmtBalance.h"
|
||||
#include "tstatus.h"
|
||||
|
||||
void mgmtStartBalanceTimer(int mseconds) {}
|
||||
void mgmtStartBalanceTimer(int64_t mseconds) {}
|
||||
|
||||
int mgmtInitBalance() { return 0; }
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ char *taosBuildReqMsgToDnode(SDnodeObj *pObj, char type) {
|
|||
int taosSendSimpleRspToDnode(SDnodeObj *pObj, char rsptype, char code) { return 0; }
|
||||
|
||||
int taosSendMsgToDnode(SDnodeObj *pObj, char *msg, int msgLen) {
|
||||
mTrace("msg:%s is sent to dnode", taosMsg[*(msg-1)]);
|
||||
mTrace("msg:%s is sent to dnode", taosMsg[(uint8_t)(*(msg-1))]);
|
||||
|
||||
/*
|
||||
* Lite version has no message header, so minus one
|
||||
|
@ -142,7 +142,7 @@ void mgmtProcessDnodeStatus(void *handle, void *tmrId) {
|
|||
void mgmtProcessMsgFromDnodeSpec(SSchedMsg *sched) {
|
||||
char msgType = *sched->msg;
|
||||
char *content = sched->msg + 1;
|
||||
mTrace("msg:%s is received from dnode", taosMsg[msgType]);
|
||||
mTrace("msg:%s is received from dnode", taosMsg[(uint8_t)msgType]);
|
||||
|
||||
mgmtProcessMsgFromDnode(content, 0, msgType, mgmtGetDnode(0));
|
||||
free(sched->msg);
|
||||
|
|
|
@ -24,7 +24,7 @@ char* vnodeGetDataDir(int vnode, int fileId) { return dataDir; }
|
|||
void vnodeAdustVnodeFile(SVnodeObj *pVnode) {
|
||||
// Retention policy here
|
||||
int fileId = pVnode->fileId - pVnode->numOfFiles + 1;
|
||||
int cfile = taosGetTimestamp(pVnode->cfg.precision)/pVnode->cfg.daysPerFile/tsMsPerDay[pVnode->cfg.precision];
|
||||
int cfile = taosGetTimestamp(pVnode->cfg.precision)/pVnode->cfg.daysPerFile/tsMsPerDay[(uint8_t)pVnode->cfg.precision];
|
||||
while (fileId <= cfile - pVnode->maxFiles) {
|
||||
vnodeRemoveFile(pVnode->vnode, fileId);
|
||||
pVnode->numOfFiles--;
|
||||
|
|
|
@ -355,16 +355,16 @@ int tsCompressINTImp(const char *const input, const int nelements, char *const o
|
|||
tmp_bit = (LONG_BYTES * BITS_PER_BYTE) - BUILDIN_CLZL(zigzag_value);
|
||||
}
|
||||
|
||||
if (elems + 1 <= selector_to_elems[selector] && elems + 1 <= selector_to_elems[bit_to_selector[tmp_bit]]) {
|
||||
if (elems + 1 <= selector_to_elems[(uint8_t)selector] && elems + 1 <= selector_to_elems[(uint8_t)bit_to_selector[(uint8_t)tmp_bit]]) {
|
||||
// If can hold another one.
|
||||
selector = selector > bit_to_selector[tmp_bit] ? selector : bit_to_selector[tmp_bit];
|
||||
selector = selector > bit_to_selector[(uint8_t)tmp_bit] ? selector : bit_to_selector[(uint8_t)tmp_bit];
|
||||
elems++;
|
||||
bit = bit_per_integer[selector];
|
||||
bit = bit_per_integer[(uint8_t)selector];
|
||||
} else {
|
||||
// if cannot hold another one.
|
||||
while (elems < selector_to_elems[selector]) selector++;
|
||||
elems = selector_to_elems[selector];
|
||||
bit = bit_per_integer[selector];
|
||||
while (elems < selector_to_elems[(uint8_t)selector]) selector++;
|
||||
elems = selector_to_elems[(uint8_t)selector];
|
||||
bit = bit_per_integer[(uint8_t)selector];
|
||||
break;
|
||||
}
|
||||
prev_value_tmp = curr_value;
|
||||
|
@ -455,8 +455,8 @@ int tsDecompressINTImp(const char *const input, const int nelements, char *const
|
|||
memcpy(&w, ip, LONG_BYTES);
|
||||
|
||||
char selector = (char)(w & INT64MASK(4)); // selector = 4
|
||||
char bit = bit_per_integer[selector]; // bit = 3
|
||||
int elems = selector_to_elems[selector];
|
||||
char bit = bit_per_integer[(uint8_t)selector]; // bit = 3
|
||||
int elems = selector_to_elems[(uint8_t)selector];
|
||||
|
||||
for (int i = 0; i < elems; i++) {
|
||||
uint64_t zigzag_value;
|
||||
|
|
|
@ -25,8 +25,6 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#include "tcrc32c.h"
|
||||
//todo : use the original source code
|
||||
//#pragma GCC diagnostic ignored "-Wunused-function"
|
||||
|
||||
#define POLY 0x82f63b78
|
||||
#define LONG_SHIFT 8192
|
||||
|
|
|
@ -23,8 +23,6 @@
|
|||
#include "ttypes.h"
|
||||
#include "tutil.h"
|
||||
|
||||
//#pragma GCC diagnostic ignored "-Wformat"
|
||||
|
||||
#define COLMODEL_GET_VAL(data, schema, allrow, rowId, colId) \
|
||||
(data + (schema)->colOffset[colId] * (allrow) + (rowId) * (schema)->pFields[colId].bytes)
|
||||
|
||||
|
|
|
@ -510,7 +510,7 @@ uint32_t tSQLGetToken(char* z, uint32_t* tokenType) {
|
|||
if ((z[i] == 'a' || z[i] == 's' || z[i] == 'm' || z[i] == 'h' || z[i] == 'd' || z[i] == 'n' || z[i] == 'y' ||
|
||||
z[i] == 'w' || z[i] == 'A' || z[i] == 'S' || z[i] == 'M' || z[i] == 'H' || z[i] == 'D' || z[i] == 'N' ||
|
||||
z[i] == 'Y' || z[i] == 'W') &&
|
||||
(isIdChar[z[i + 1]] == 0)) {
|
||||
(isIdChar[(uint8_t)z[i + 1]] == 0)) {
|
||||
*tokenType = TK_VARIABLE;
|
||||
i += 1;
|
||||
return i;
|
||||
|
@ -551,7 +551,7 @@ uint32_t tSQLGetToken(char* z, uint32_t* tokenType) {
|
|||
case 't':
|
||||
case 'F':
|
||||
case 'f': {
|
||||
for (i = 1; ((z[i] & 0x80) == 0) && isIdChar[z[i]]; i++) {
|
||||
for (i = 1; ((z[i] & 0x80) == 0) && isIdChar[(uint8_t)z[i]]; i++) {
|
||||
}
|
||||
|
||||
if ((i == 4 && strncasecmp(z, "true", 4) == 0) || (i == 5 && strncasecmp(z, "false", 5) == 0)) {
|
||||
|
@ -560,10 +560,10 @@ uint32_t tSQLGetToken(char* z, uint32_t* tokenType) {
|
|||
}
|
||||
}
|
||||
default: {
|
||||
if (((*z & 0x80) != 0) || !isIdChar[*z]) {
|
||||
if (((*z & 0x80) != 0) || !isIdChar[(uint8_t)(*z)]) {
|
||||
break;
|
||||
}
|
||||
for (i = 1; ((z[i] & 0x80) == 0) && isIdChar[z[i]]; i++) {
|
||||
for (i = 1; ((z[i] & 0x80) == 0) && isIdChar[(uint8_t)z[i]]; i++) {
|
||||
}
|
||||
*tokenType = tSQLKeywordCode(z, i);
|
||||
return i;
|
||||
|
|
Loading…
Reference in New Issue