github-actions[bot] commented on code in PR #42474: URL: https://github.com/apache/doris/pull/42474#discussion_r1816117741
########## be/src/vec/functions/function_string.h: ########## @@ -2961,21 +2971,23 @@ memcpy(result_data + (append_sign_manually ? 1 : 0), p, integer_str_len); *(result_data + whole_decimal_str_len - 3) = '.'; - *(result_data + whole_decimal_str_len - 2) = '0' + std::abs(static_cast<int>(frac_value / 10)); - *(result_data + whole_decimal_str_len - 1) = '0' + std::abs(static_cast<int>(frac_value % 10)); + *(result_data + whole_decimal_str_len - 2) = + '0' + (char)std::abs(static_cast<int>(frac_value / 10)); + *(result_data + whole_decimal_str_len - 1) = + '0' + (char)std::abs(static_cast<int>(frac_value % 10)); return result; }; // Note string value must be valid decimal string which contains two digits after the decimal point static StringRef do_money_format(FunctionContext* context, const string& value) { bool is_positive = (value[0] != '-'); - int32_t result_len = value.size() + (value.size() - (is_positive ? 4 : 5)) / 3; + int32_t result_len = (int32_t)(value.size() + (value.size() - (is_positive ? 4 : 5)) / 3); Review Comment: warning: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto] ```suggestion auto result_len = (int32_t)(value.size() + (value.size() - (is_positive ? 4 : 5)) / 3); ``` ########## be/src/vec/functions/function_string.h: ########## @@ -2947,7 +2957,7 @@ StringRef do_money_format(FunctionContext* context, UInt32 scale, T int_value, T char local[N]; char* p = SimpleItoaWithCommas(int_value, local, sizeof(local)); - const Int32 integer_str_len = N - (p - local); + const Int32 integer_str_len = (Int32)(N - (p - local)); Review Comment: warning: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto] ```suggestion const auto integer_str_len = (Int32)(N - (p - local)); ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org