Skip to content

Commit 441f28a

Browse files
authored
[fix](cloud) Fix double assignment in recycler_service.cpp that cause… (#64168)
Fix undefined behavior in RecyclerServiceImpl::statistics_recycle where 'to_recycle_bytes' was assigned twice in the same expression: int64_t to_recycle_bytes = to_recycle_bytes = ... This triggers -Werror=sequence-point on GCC and breaks cloud build. Introduced by: #55455
1 parent 11a038d commit 441f28a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cloud/src/recycler/recycler_service.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ void RecyclerServiceImpl::statistics_recycle(StatisticsRecycleRequest& req, Meta
239239
std::ranges::for_each(resource_types, [&](const auto& resource_type) {
240240
int64_t to_recycle_num =
241241
g_bvar_recycler_instance_last_round_to_recycle_num.get({id, resource_type});
242-
int64_t to_recycle_bytes = to_recycle_bytes =
242+
int64_t to_recycle_bytes =
243243
g_bvar_recycler_instance_last_round_to_recycle_bytes.get({id, resource_type});
244244

245245
ss << "Task Type: " << resource_type << "\n";

0 commit comments

Comments
 (0)