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 2022/06/02 16:42:24 UTC

[GitHub] [arrow] westonpace commented on a diff in pull request #13293: ARROW-16725: [C++] Fix compilation warnings in release mode

westonpace commented on code in PR #13293:
URL: https://github.com/apache/arrow/pull/13293#discussion_r888164341


##########
cpp/src/arrow/compute/kernels/vector_sort.cc:
##########
@@ -2006,10 +2006,11 @@ class ArrayRanker : public TypeVisitor {
       }
 
       case RankOptions::Min: {
-        T curr_value, prev_value;
+        T curr_value, prev_value{};
+        rank = 0;
 
         if (null_placement_ == NullPlacement::AtStart) {
-          rank = 1;
+          rank++;

Review Comment:
   This seems harmless but why this change?



##########
cpp/src/arrow/compute/exec/ir_consumer.cc:
##########
@@ -625,7 +625,7 @@ Result<Declaration> Convert(const ir::Relation& rel) {
             break;
         }
 
-        NullPlacement key_null_placement;
+        NullPlacement key_null_placement{};

Review Comment:
   Perhaps we could add a default case to the switch statement instead?  Although I think this code is going away so probably not worth it to nitpick.



-- 
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