You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by GitBox <gi...@apache.org> on 2022/12/03 13:12:32 UTC

[GitHub] [incubator-kvrocks] PragmaTwice commented on a diff in pull request #1153: Fix cppcoreguidelines-init-variables warning reported by clang-tidy

PragmaTwice commented on code in PR #1153:
URL: https://github.com/apache/incubator-kvrocks/pull/1153#discussion_r1038775563


##########
src/types/redis_set.cc:
##########
@@ -244,7 +244,7 @@ rocksdb::Status Set::Take(const Slice &user_key, std::vector<std::string> *membe
 }
 
 rocksdb::Status Set::Move(const Slice &src, const Slice &dst, const Slice &member, int *ret) {
-  RedisType type;
+  RedisType type = 0;

Review Comment:
   ```suggestion
     RedisType type = kRedisNone;
   ```



##########
src/types/redis_list.cc:
##########
@@ -436,7 +436,7 @@ rocksdb::Status List::Set(const Slice &user_key, int index, Slice elem) {
 }
 
 rocksdb::Status List::RPopLPush(const Slice &src, const Slice &dst, std::string *elem) {
-  RedisType type;
+  RedisType type = 0;

Review Comment:
   ```suggestion
     RedisType type = kRedisNone;
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org