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

@ -114,7 +114,7 @@ int ObPhysicalRestoreWhiteList::get_format_str(
ret = OB_ERR_UNEXPECTED;
LOG_WARN("unexpected format str", KR(ret), K(format_str_buf), K(format_str_length));
} else {
str.assign_ptr(format_str_buf, format_str_length - 1);
str.assign_ptr(format_str_buf, static_cast<int32_t>(format_str_length - 1));
LOG_DEBUG("get format white_list str", KR(ret), K(str));
}
return ret;
@ -152,7 +152,7 @@ int ObPhysicalRestoreWhiteList::get_hex_str(
ret = OB_SIZE_OVERFLOW;
LOG_WARN("encode error", KR(ret), K(hex_pos), K(hex_size));
} else {
str.assign_ptr(hex_buf, hex_size);
str.assign_ptr(hex_buf, static_cast<int32_t>(hex_size));
LOG_DEBUG("get hex white_list str", KR(ret), K(str));
}
return ret;

View File

@ -314,7 +314,7 @@ int ObLSRestoreProgressPersistInfo::parse_from(common::sqlclient::ObMySQLResult
EXTRACT_INT_FIELD_MYSQL(result, OB_STR_FINISH_TABLET_COUNT, finish_tablet_count_, int64_t);
EXTRACT_INT_FIELD_MYSQL(result, OB_STR_TOTAL_BYTES, total_bytes_, int64_t);
EXTRACT_INT_FIELD_MYSQL(result, OB_STR_FINISH_BYTES, finish_bytes_, int64_t);
EXTRACT_INT_FIELD_MYSQL(result, OB_STR_RESULT, result_, int64_t);
EXTRACT_INT_FIELD_MYSQL(result, OB_STR_RESULT, result_, int32_t);
EXTRACT_STRBUF_FIELD_MYSQL(result, OB_STR_TRACE_ID, trace_id, OB_MAX_TRACE_ID_BUFFER_SIZE, real_length);
EXTRACT_STRBUF_FIELD_MYSQL(result, OB_STR_COMMENT, comment, MAX_TABLE_COMMENT_LENGTH, real_length);
@ -395,7 +395,7 @@ const char *ObHisRestoreJobPersistInfo::get_status_str() const
int ObHisRestoreJobPersistInfo::get_status(const ObString &str_str) const
{
int status = -1;
for (int64_t i = 0; i < ARRAYSIZEOF(STATUS_STR); ++i) {
for (int32_t i = 0; i < ARRAYSIZEOF(STATUS_STR); ++i) {
if (0 == str_str.case_compare(STATUS_STR[i])) {
status = i;
break;