This is an automated email from the ASF dual-hosted git repository.
hellostephen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 0a0c5025364 [fix](be-ut) fix compile warning: declaration shadows a
local variable (#45204)
0a0c5025364 is described below
commit 0a0c50253649f8a5dc1f377162df7c9549347b36
Author: Socrates <[email protected]>
AuthorDate: Mon Dec 9 18:44:24 2024 +0800
[fix](be-ut) fix compile warning: declaration shadows a local variable
(#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()) {
```
---
be/src/vec/sink/writer/vtablet_writer.cpp | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/be/src/vec/sink/writer/vtablet_writer.cpp
b/be/src/vec/sink/writer/vtablet_writer.cpp
index 55b6845b6bc..0de868c00b9 100644
--- a/be/src/vec/sink/writer/vtablet_writer.cpp
+++ b/be/src/vec/sink/writer/vtablet_writer.cpp
@@ -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;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]