github-actions[bot] commented on code in PR #21118: URL: https://github.com/apache/doris/pull/21118#discussion_r1339798437
########## be/src/http/action/debug_point_action.cpp: ########## @@ -43,32 +44,36 @@ void BaseDebugPointAction::handle(HttpRequest* req) { } Status AddDebugPointAction::_handle(HttpRequest* req) { - std::string debug_point = req->param("debug_point"); + std::string name = req->param("debug_point"); std::string execute = req->param("execute"); std::string timeout = req->param("timeout"); - if (debug_point.empty()) { + if (name.empty()) { return Status::InternalError("Empty debug point name"); } - int64_t execute_limit = -1; - int64_t timeout_second = -1; + auto debug_point = std::make_shared<DebugPoint>(); try { if (!execute.empty()) { - execute_limit = std::stol(execute); + debug_point->execute_limit = std::stol(execute); } } catch (const std::exception& e) { return Status::InternalError("Invalid execute limit format, execute {}, err {}", execute, e.what()); } try { if (!timeout.empty()) { - timeout_second = std::stol(timeout); + int64_t timeout_second = std::stol(timeout); Review Comment: warning: variable 'timeout_second' is not initialized [cppcoreguidelines-init-variables] ```suggestion int64_t timeout_second = 0 = std::stol(timeout); ``` ########## be/src/http/action/debug_point_action.cpp: ########## @@ -43,32 +44,36 @@ void BaseDebugPointAction::handle(HttpRequest* req) { } Status AddDebugPointAction::_handle(HttpRequest* req) { - std::string debug_point = req->param("debug_point"); + std::string name = req->param("debug_point"); Review Comment: warning: variable 'name' is not initialized [cppcoreguidelines-init-variables] ```suggestion std::string name = 0 = req->param("debug_point"); ``` ########## be/src/util/debug_points.h: ########## @@ -18,19 +18,21 @@ #pragma once #include <atomic> +#include <boost/lexical_cast.hpp> Review Comment: warning: 'boost/lexical_cast.hpp' file not found [clang-diagnostic-error] ```cpp #include <boost/lexical_cast.hpp> ^ ``` -- 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