提交 da40c925 编写于 作者: H hjxilinx

[td-98] fix compiler error

上级 1dd2e59e
......@@ -924,7 +924,7 @@ static void blockwiseApplyAllFunctions(SQueryRuntimeEnv *pRuntimeEnv, SDataStati
STimeWindow win = getActiveTimeWindow(pWindowResInfo, ts, pQuery);
if (setWindowOutputBufByKey(pRuntimeEnv, pWindowResInfo, pDataBlockInfo->sid, &win) != TSDB_CODE_SUCCESS) {
return 0;
return;
}
TSKEY ekey = reviseWindowEkey(pQuery, &win);
......
......@@ -121,11 +121,7 @@ int64_t strnatoi(char *num, int32_t len);
char* strreplace(const char* str, const char* pattern, const char* rep);
#define POW2(x) ((x) * (x))
int32_t strdequote(char *src);
char *paGetToken(char *src, size_t maxLen, char **token, int32_t *tokenLen);
char *paGetToken(char *src, char **token, int32_t *tokenLen);
void taosMsleep(int32_t mseconds);
......@@ -133,8 +129,6 @@ int32_t taosByteArrayToHexStr(char bytes[], int32_t len, char hexstr[]);
int32_t taosHexStrToByteArray(char hexstr[], char bytes[]);
int64_t str2int64(char *str);
int32_t taosFileRename(char *fullPath, char *suffix, char delimiter, char **dstPath);
/**
......
......@@ -874,12 +874,13 @@ void tsReadGlobalLogConfig() {
olen = vlen = 0;
getline(&line, &len, fp);
paGetToken(line, len, &option, &olen);
line[len - 1] = 0;
paGetToken(line, &option, &olen);
if (olen == 0) continue;
option[olen] = 0;
paGetToken(option + olen + 1, len, &value, &vlen);
paGetToken(option + olen + 1, &value, &vlen);
if (vlen == 0) continue;
value[vlen] = 0;
......@@ -911,18 +912,19 @@ bool tsReadGlobalConfig() {
olen = vlen = 0;
getline(&line, &len, fp);
paGetToken(line, len, &option, &olen);
line[len - 1] = 0;
paGetToken(line, &option, &olen);
if (olen == 0) continue;
option[olen] = 0;
paGetToken(option + olen + 1, len, &value, &vlen);
paGetToken(option + olen + 1, &value, &vlen);
if (vlen == 0) continue;
value[vlen] = 0;
// For dataDir, the format is:
// dataDir /mnt/disk1 0
paGetToken(value + vlen + 1, len, &value1, &vlen1);
paGetToken(value + vlen + 1, &value1, &vlen1);
tsReadConfigOption(option, value);
}
......@@ -1005,11 +1007,10 @@ int tsCfgDynamicOptions(char *msg) {
int olen, vlen, code = 0;
int vint = 0;
size_t len = 120;
paGetToken(msg, len, &option, &olen);
paGetToken(msg, &option, &olen);
if (olen == 0) return TSDB_CODE_INVALID_MSG_CONTENT;
paGetToken(option + olen + 1, len, &value, &vlen);
paGetToken(option + olen + 1, &value, &vlen);
if (vlen == 0)
vint = 135;
else {
......
......@@ -164,9 +164,8 @@ char* strtolower(char *dst, const char *src) {
return dst;
}
char *paGetToken(char *string, size_t maxLen, char **token, int32_t *tokenLen) {
char *paGetToken(char *string, char **token, int32_t *tokenLen) {
char quote = 0;
char* start = string;
while (*string != 0) {
if (*string == ' ' || *string == '\t') {
......@@ -183,7 +182,7 @@ char *paGetToken(char *string, size_t maxLen, char **token, int32_t *tokenLen) {
*token = string;
while (*string != 0 && *string != '\n' && (string - start < maxLen)) {
while (*string != 0) {
if (*string == '@' && quote) {
//*string = 0;
++string;
......@@ -337,7 +336,7 @@ int32_t taosByteArrayToHexStr(char bytes[], int32_t len, char hexstr[]) {
char hexval[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
for (i = 0; i < len; i++) {
hexstr[i * 2] = hexval[((bytes[i] >> 4) & 0xF)];
hexstr[i * 2] = hexval[((bytes[i] >> 4u) & 0xF)];
hexstr[(i * 2) + 1] = hexval[(bytes[i]) & 0x0F];
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册