add -Wshorten-64-to-32 for share

This commit is contained in:
xuhuleon
2023-02-07 00:40:01 +08:00
committed by ob-robot
parent 822aaaf7f2
commit c157309bc6
168 changed files with 502 additions and 636 deletions

View File

@ -1146,7 +1146,7 @@ inline int encode(char *buf, const int64_t buf_len, int64_t &pos, sql::ObExpr *e
if (NULL != expr) {
sql::ObExpr::ObExprIArray *array = sql::ObExpr::get_serialize_array();
if (OB_UNLIKELY(NULL == array || array->empty() || expr < &array->at(0)
|| (idx = expr - &array->at(0) + 1) > array->count())) {
|| (idx = static_cast<uint32_t>(expr - &array->at(0) + 1)) > array->count())) {
ret = OB_ERR_UNEXPECTED;
SQL_LOG(WARN, "expr not in array", K(ret), KP(array), KP(idx), KP(expr));
}