You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/08/11 06:15:37 UTC

[GitHub] [arrow] pitrou commented on a change in pull request #10907: ARROW-13600: [C++] Fix maybe uninitialized warnings

pitrou commented on a change in pull request #10907:
URL: https://github.com/apache/arrow/pull/10907#discussion_r686528913



##########
File path: cpp/src/arrow/compute/exec/key_hash.cc
##########
@@ -186,11 +186,12 @@ void Hashing::hash_varlen_helper(uint32_t length, const uint8_t* key, uint32_t*
 
   int tail = length % 16;
   if (tail) {
-    uint64_t last_stripe[2];
-    const uint64_t* last_stripe_base =
+    uint32_t lanes[4];
+    uint64_t* const last_stripe = reinterpret_cast<uint64_t*>(lanes);

Review comment:
       This is turning fine code into obfuscated code for no good reason. Just zero-initialize `last_strip` if you want to silence this warning?




-- 
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: github-unsubscribe@arrow.apache.org

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