You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by mi...@apache.org on 2023/09/19 22:45:08 UTC
[impala] branch master updated: IMPALA-12390 (part3): Enable unnecessary-copy-initialization
This is an automated email from the ASF dual-hosted git repository.
michaelsmith pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git
The following commit(s) were added to refs/heads/master by this push:
new 4d15558b5 IMPALA-12390 (part3): Enable unnecessary-copy-initialization
4d15558b5 is described below
commit 4d15558b5eaa69e872917c8bbf69dc1dc2146bc5
Author: Michael Smith <mi...@cloudera.com>
AuthorDate: Tue Sep 19 09:54:56 2023 -0700
IMPALA-12390 (part3): Enable unnecessary-copy-initialization
Enables the clang-tidy performance-unnecessary-copy-initialization check
and fixes any issues found with run_clang_tidy.sh.
Change-Id: I217df2598b21551fe21099c2caa5a39865010c20
Reviewed-on: http://gerrit.cloudera.org:8080/20492
Reviewed-by: Joe McDonnell <jo...@cloudera.com>
Tested-by: Michael Smith <mi...@cloudera.com>
---
.clang-tidy | 1 -
be/src/runtime/coordinator.cc | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/.clang-tidy b/.clang-tidy
index df86e3bec..f54f14933 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -75,7 +75,6 @@ Checks: "-*,clang*,\
-clang-diagnostic-weak-template-vtables,\
-clang-diagnostic-weak-vtables,\
performance-*,\
--performance-unnecessary-copy-initialization,\
-performance-unnecessary-value-param"
# Ignore warnings in gutil
diff --git a/be/src/runtime/coordinator.cc b/be/src/runtime/coordinator.cc
index 90592ac2c..20a97498a 100644
--- a/be/src/runtime/coordinator.cc
+++ b/be/src/runtime/coordinator.cc
@@ -1169,7 +1169,7 @@ Status Coordinator::UpdateBlacklistWithAuxErrorInfo(
// that contains a valid RPCErrorInfoPB object.
for (const auto& aux_error : *aux_error_info) {
if (aux_error.has_rpc_error_info()) {
- RPCErrorInfoPB rpc_error_info = aux_error.rpc_error_info();
+ const RPCErrorInfoPB& rpc_error_info = aux_error.rpc_error_info();
DCHECK(rpc_error_info.has_dest_node());
DCHECK(rpc_error_info.has_posix_error_code());
const NetworkAddressPB& dest_node = rpc_error_info.dest_node();