add -Wshorten-64-to-32 for share
This commit is contained in:
@ -54,7 +54,7 @@ static int check_and_assign_ptr_(const char *others_ptr,
|
||||
DETECT_LOG(WARN, "string length is not satisfied length limit",
|
||||
PRINT_WRAPPER, K(STR_LEN_LIMIT));
|
||||
} else {
|
||||
self_string->assign_ptr(others_ptr, calculated_len);
|
||||
self_string->assign_ptr(others_ptr, static_cast<int32_t>(calculated_len));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -105,8 +105,9 @@ public:
|
||||
if (OB_SUCCESS != rcode.rcode_) {
|
||||
DETECT_LOG_RET(WARN, rcode.rcode_, "detector rpc returns error code(rpc level)", K(rcode), K(dst));
|
||||
} else if (OB_SUCCESS != remote_ret) {
|
||||
DETECT_LOG_RET(WARN, remote_ret, "detector rpc returns error code(detector level)",
|
||||
KR(remote_ret), K(rcode.rcode_), K(dst));
|
||||
const int32_t tmp_ret = static_cast<int32_t>(remote_ret);
|
||||
DETECT_LOG_RET(WARN, tmp_ret, "detector rpc returns error code(detector level)",
|
||||
KR(tmp_ret), K(rcode.rcode_), K(dst));
|
||||
} else {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
@ -119,7 +119,7 @@ int64_t UserBinaryKey::to_string(char *buffer, const int64_t length) const
|
||||
#undef USER_REGISTER
|
||||
default:
|
||||
static const char *err_str = "invalid key";
|
||||
const int err_str_len = strlen(err_str);
|
||||
const int64_t err_str_len = strlen(err_str);
|
||||
if (length >= err_str_len) {
|
||||
memcpy(buffer, err_str, err_str_len);
|
||||
used_length = err_str_len;
|
||||
|
||||
@ -210,7 +210,7 @@ void ObLCLBatchSenderThread::run1()
|
||||
record_summary_info_and_logout_when_necessary_(begin_ts, end_ts, diff);
|
||||
|
||||
if (diff < _lcl_op_interval) {
|
||||
ob_usleep(_lcl_op_interval - diff);
|
||||
ob_usleep(static_cast<uint32_t>(_lcl_op_interval - diff));
|
||||
// DETECT_LOG(DEBUG, "scan done", K(diff), K(*this));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user