[Resolve compile alarms]
This commit is contained in:
parent
5c4654fd0b
commit
27f51a5cea
|
@ -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);
|
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[(int)selector] && elems + 1 <= selector_to_elems[(int)(bit_to_selector[(int)tmp_bit])]) {
|
||||||
// If can hold another one.
|
// If can hold another one.
|
||||||
selector = selector > bit_to_selector[tmp_bit] ? selector : bit_to_selector[tmp_bit];
|
selector = selector > bit_to_selector[(int)tmp_bit] ? selector : bit_to_selector[(int)tmp_bit];
|
||||||
elems++;
|
elems++;
|
||||||
bit = bit_per_integer[selector];
|
bit = bit_per_integer[(int)selector];
|
||||||
} else {
|
} else {
|
||||||
// if cannot hold another one.
|
// if cannot hold another one.
|
||||||
while (elems < selector_to_elems[selector]) selector++;
|
while (elems < selector_to_elems[(int)selector]) selector++;
|
||||||
elems = selector_to_elems[selector];
|
elems = selector_to_elems[(int)selector];
|
||||||
bit = bit_per_integer[selector];
|
bit = bit_per_integer[(int)selector];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
prev_value_tmp = curr_value;
|
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);
|
memcpy(&w, ip, LONG_BYTES);
|
||||||
|
|
||||||
char selector = (char)(w & INT64MASK(4)); // selector = 4
|
char selector = (char)(w & INT64MASK(4)); // selector = 4
|
||||||
char bit = bit_per_integer[selector]; // bit = 3
|
char bit = bit_per_integer[(int)selector]; // bit = 3
|
||||||
int elems = selector_to_elems[selector];
|
int elems = selector_to_elems[(int)selector];
|
||||||
|
|
||||||
for (int i = 0; i < elems; i++) {
|
for (int i = 0; i < elems; i++) {
|
||||||
uint64_t zigzag_value;
|
uint64_t zigzag_value;
|
||||||
|
|
|
@ -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' ||
|
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] == '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') &&
|
z[i] == 'Y' || z[i] == 'W') &&
|
||||||
(isIdChar[z[i + 1]] == 0)) {
|
(isIdChar[(int)(z[i + 1])] == 0)) {
|
||||||
*tokenType = TK_VARIABLE;
|
*tokenType = TK_VARIABLE;
|
||||||
i += 1;
|
i += 1;
|
||||||
return i;
|
return i;
|
||||||
|
@ -551,7 +551,7 @@ uint32_t tSQLGetToken(char* z, uint32_t* tokenType) {
|
||||||
case 't':
|
case 't':
|
||||||
case 'F':
|
case 'F':
|
||||||
case 'f': {
|
case 'f': {
|
||||||
for (i = 1; ((z[i] & 0x80) == 0) && isIdChar[z[i]]; i++) {
|
for (i = 1; ((z[i] & 0x80) == 0) && isIdChar[(int)(z[i])]; i++) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((i == 4 && strncasecmp(z, "true", 4) == 0) || (i == 5 && strncasecmp(z, "false", 5) == 0)) {
|
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: {
|
default: {
|
||||||
if (((*z & 0x80) != 0) || !isIdChar[*z]) {
|
if (((*z & 0x80) != 0) || !isIdChar[(int)(*z)]) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
for (i = 1; ((z[i] & 0x80) == 0) && isIdChar[z[i]]; i++) {
|
for (i = 1; ((z[i] & 0x80) == 0) && isIdChar[(int)(z[i])]; i++) {
|
||||||
}
|
}
|
||||||
*tokenType = tSQLKeywordCode(z, i);
|
*tokenType = tSQLKeywordCode(z, i);
|
||||||
return i;
|
return i;
|
||||||
|
|
Loading…
Reference in New Issue