Skip to content

Commit

Permalink
[fix](be-ut) fix compile warning: declaration shadows a local variable (
Browse files Browse the repository at this point in the history
#45204)

### What problem does this PR solve?
Problem Summary:
```text
FAILED: src/vec/CMakeFiles/Vec.dir/sink/writer/vtablet_writer.cpp.o
/root/doris/be/src/vec/sink/writer/vtablet_writer.cpp:1402:23: error: declaration shadows a local variable [-Werror,-Wshadow]
    } else if (Status st = ich.check_tablet_filtered_rows_consistency(); !st.ok()) {
/root/doris/be/src/vec/sink/writer/vtablet_writer.cpp:1400:23: note: previous declaration is here
    } else if (Status st = ich.check_tablet_received_rows_consistency(); !st.ok()) {
```
  • Loading branch information
suxiaogang223 authored Dec 9, 2024
1 parent 8c5307e commit 0a0c502
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions be/src/vec/sink/writer/vtablet_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1394,13 +1394,12 @@ static Status cancel_channel_and_check_intolerable_failure(Status status,
nch.cancel(err_msg);

// check if index has intolerable failure
Status index_st = ich.check_intolerable_failure();
if (!index_st.ok()) {
if (Status index_st = ich.check_intolerable_failure(); !index_st.ok()) {
status = std::move(index_st);
} else if (Status st = ich.check_tablet_received_rows_consistency(); !st.ok()) {
status = std::move(st);
} else if (Status st = ich.check_tablet_filtered_rows_consistency(); !st.ok()) {
status = std::move(st);
} else if (Status receive_st = ich.check_tablet_received_rows_consistency(); !receive_st.ok()) {
status = std::move(receive_st);
} else if (Status filter_st = ich.check_tablet_filtered_rows_consistency(); !filter_st.ok()) {
status = std::move(filter_st);
}
return status;
}
Expand Down

0 comments on commit 0a0c502

Please sign in to comment.