You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kvrocks.apache.org by tw...@apache.org on 2022/11/15 06:42:52 UTC
[incubator-kvrocks] branch unstable updated: Fix modernize-use-using warning reported by clang-tidy (#1114)
This is an automated email from the ASF dual-hosted git repository.
twice pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/incubator-kvrocks.git
The following commit(s) were added to refs/heads/unstable by this push:
new 9bebd6b8 Fix modernize-use-using warning reported by clang-tidy (#1114)
9bebd6b8 is described below
commit 9bebd6b81c170facc79f3e26dff3e5bd038c5f7b
Author: Ruixiang Tan <81...@qq.com>
AuthorDate: Tue Nov 15 14:42:47 2022 +0800
Fix modernize-use-using warning reported by clang-tidy (#1114)
Co-authored-by: Twice <tw...@gmail.com>
---
.clang-tidy | 2 +-
src/common/sha1.cc | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.clang-tidy b/.clang-tidy
index 1742da13..8e99fcc1 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -1,7 +1,7 @@
# refer to https://clang.llvm.org/extra/clang-tidy/checks/list.html
Checks: -*, clang-analyzer-core.*, clang-analyzer-cplusplus.*, clang-analyzer-deadcode.*, clang-analyzer-nullability.*, clang-analyzer-security.*, clang-analyzer-unix.*, clang-analyzer-valist.*, cppcoreguidelines-init-variables, cppcoreguidelines-macro-usage, cppcoreguidelines-interfaces-global-init, cppcoreguidelines-narrowing-conversions, cppcoreguidelines-no-malloc, cppcoreguidelines-prefer-member-initializer, cppcoreguidelines-special-member-functions, cppcoreguidelines-slicing, goog [...]
-WarningsAsErrors: clang-analyzer-*, -clang-analyzer-security.insecureAPI.rand, cppcoreguidelines-interfaces-global-init, cppcoreguidelines-no-malloc, cppcoreguidelines-slicing, google-*, modernize-use-emplace, modernize-use-equals-default, modernize-use-equals-delete, performance-implicit-conversion-in-loop, performance-inefficient-algorithm, performance-move-constructor-init, performance-no-automatic-move, performance-trivially-destructible, performance-type-promotion-in-math-fn, perfor [...]
+WarningsAsErrors: clang-analyzer-*, -clang-analyzer-security.insecureAPI.rand, cppcoreguidelines-interfaces-global-init, cppcoreguidelines-no-malloc, cppcoreguidelines-slicing, google-*, modernize-use-emplace, modernize-use-equals-default, modernize-use-equals-delete, performance-implicit-conversion-in-loop, performance-inefficient-algorithm, performance-move-constructor-init, performance-no-automatic-move, performance-trivially-destructible, performance-type-promotion-in-math-fn, perfor [...]
CheckOptions:
- key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
diff --git a/src/common/sha1.cc b/src/common/sha1.cc
index d24451f9..4a434622 100644
--- a/src/common/sha1.cc
+++ b/src/common/sha1.cc
@@ -79,10 +79,10 @@ A million repetitions of "a"
void SHA1Transform(uint32_t state[5], const unsigned char buffer[64]) {
uint32_t a, b, c, d, e;
- typedef union {
+ union CHAR64LONG16 {
unsigned char c[64];
uint32_t l[16];
- } CHAR64LONG16;
+ };
#ifdef SHA1HANDSOFF
CHAR64LONG16 block[1]; /* use array to appear as a pointer */
memcpy(block, buffer, 64);