github-actions[bot] commented on code in PR #22933: URL: https://github.com/apache/doris/pull/22933#discussion_r1314410847
########## be/test/geo/geo_types_test.cpp: ########## @@ -44,15 +45,10 @@ TEST_F(GeoTypesTest, point_normal) { std::string buf; point.encode_to(&buf); { - std::unique_ptr<GeoShape> point2(GeoShape::from_encoded(buf.data(), buf.size())); + size_t a = buf.size(); + std::unique_ptr<GeoShape> point2(GeoShape::from_encoded(buf.data(), a)); Review Comment: warning: variable 'point2' is not initialized [cppcoreguidelines-init-variables] ```suggestion std::unique_ptr<GeoShape> point2 = 0(GeoShape::from_encoded(buf.data(), a)); ``` ########## be/test/geo/geo_types_test.cpp: ########## @@ -85,14 +81,10 @@ line->encode_to(&buf); { - std::unique_ptr<GeoShape> line2(GeoShape::from_encoded(buf.data(), buf.size())); + size_t a = buf.size(); + std::unique_ptr<GeoShape> line2(GeoShape::from_encoded(buf.data(), a)); Review Comment: warning: variable 'line2' is not initialized [cppcoreguidelines-init-variables] ```suggestion std::unique_ptr<GeoShape> line2 = 0(GeoShape::from_encoded(buf.data(), a)); ``` ########## be/test/geo/geo_types_test.cpp: ########## @@ -118,16 +110,11 @@ polygon->encode_to(&buf); { - std::unique_ptr<GeoShape> shape(GeoShape::from_encoded(buf.data(), buf.size())); + size_t a = buf.size(); + std::unique_ptr<GeoShape> shape(GeoShape::from_encoded(buf.data(), a)); Review Comment: warning: variable 'shape' is not initialized [cppcoreguidelines-init-variables] ```suggestion std::unique_ptr<GeoShape> shape = 0(GeoShape::from_encoded(buf.data(), a)); ``` ########## be/test/geo/geo_types_test.cpp: ########## @@ -184,22 +171,17 @@ TEST_F(GeoTypesTest, circle) { GeoCircle circle; - auto res = circle.init(110.123, 64, 1000); + auto res = circle.to_s2cap(110.123, 64, 1000); EXPECT_EQ(GEO_PARSE_OK, res); std::string buf; circle.encode_to(&buf); { - std::unique_ptr<GeoShape> circle2(GeoShape::from_encoded(buf.data(), buf.size())); + size_t a = buf.size(); + std::unique_ptr<GeoShape> circle2(GeoShape::from_encoded(buf.data(), a)); Review Comment: warning: variable 'circle2' is not initialized [cppcoreguidelines-init-variables] ```suggestion std::unique_ptr<GeoShape> circle2 = 0(GeoShape::from_encoded(buf.data(), a)); ``` -- 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