You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Alexey Serbin (Code Review)" <ge...@cloudera.org> on 2021/03/08 05:27:34 UTC

[kudu-CR] [gutil] use C++17's [[fallthrough]] attribute

Alexey Serbin has uploaded this change for review. ( http://gerrit.cloudera.org:8080/17156


Change subject: [gutil] use C++17's [[fallthrough]] attribute
......................................................................

[gutil] use C++17's [[fallthrough]] attribute

Since switching to C++17-compatible compiler, it's possible to use
the [[fallthrough]] attribute.  This patch does exactly so, in addition
removing now obsolete FALLTHROUGH_INTENDED macro.

Change-Id: Icd0532c0c6403f9bccfa59413a103d812633f4f6
---
M src/kudu/common/column_predicate.cc
M src/kudu/consensus/consensus_peers.cc
M src/kudu/consensus/quorum_util.cc
M src/kudu/fs/dir_manager.cc
M src/kudu/gutil/macros.h
M src/kudu/integration-tests/fuzz-itest.cc
M src/kudu/integration-tests/raft_consensus-itest-base.cc
M src/kudu/integration-tests/tombstoned_voting-stress-test.cc
M src/kudu/master/master_service.cc
M src/kudu/tablet/delta_stats.cc
M src/kudu/tablet/ops/op_driver.cc
M src/kudu/tablet/tablet_replica.cc
M src/kudu/tserver/tablet_service.cc
M src/kudu/util/threadpool.cc
14 files changed, 60 insertions(+), 116 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/56/17156/1
-- 
To view, visit http://gerrit.cloudera.org:8080/17156
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icd0532c0c6403f9bccfa59413a103d812633f4f6
Gerrit-Change-Number: 17156
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>

[kudu-CR] [gutil] use C++17's [[fallthrough]] attribute

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/17156 )

Change subject: [gutil] use C++17's [[fallthrough]] attribute
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/17156/1/src/kudu/master/master_service.cc
File src/kudu/master/master_service.cc:

http://gerrit.cloudera.org:8080/#/c/17156/1/src/kudu/master/master_service.cc@845
PS1, Line 845:     case MasterFeatures::RANGE_PARTITION_BOUNDS:    [[fallthrough]];
> Hm, not sure what this is saying. For consecutive fallthroughs should there
I'm not sure I understand what this warning points at.  Per this doc https://en.cppreference.com/w/cpp/language/switch , it seems every empty label should be supplied with [[fallthrough]]:

  Compilers may issue warnings on fallthrough (reaching the next case label without a break) unless the attribute [[fallthrough]] appears immediately before the case label to indicate that the fallthrough is intentional.

I'm going to ignore this warning from TidyBot.



-- 
To view, visit http://gerrit.cloudera.org:8080/17156
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Icd0532c0c6403f9bccfa59413a103d812633f4f6
Gerrit-Change-Number: 17156
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Bankim Bhavsar <ba...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Mon, 08 Mar 2021 06:43:25 +0000
Gerrit-HasComments: Yes

[kudu-CR] [gutil] use C++17's [[fallthrough]] attribute

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/17156 )

Change subject: [gutil] use C++17's [[fallthrough]] attribute
......................................................................

[gutil] use C++17's [[fallthrough]] attribute

Since switching to C++17-compatible compiler, it's possible to use
the [[fallthrough]] attribute.  This patch does exactly so, in addition
removing now obsolete FALLTHROUGH_INTENDED macro.

Change-Id: Icd0532c0c6403f9bccfa59413a103d812633f4f6
Reviewed-on: http://gerrit.cloudera.org:8080/17156
Tested-by: Kudu Jenkins
Reviewed-by: Andrew Wong <aw...@cloudera.com>
---
M src/kudu/common/column_predicate.cc
M src/kudu/consensus/consensus_peers.cc
M src/kudu/consensus/quorum_util.cc
M src/kudu/fs/dir_manager.cc
M src/kudu/gutil/macros.h
M src/kudu/integration-tests/fuzz-itest.cc
M src/kudu/integration-tests/raft_consensus-itest-base.cc
M src/kudu/integration-tests/tombstoned_voting-stress-test.cc
M src/kudu/master/master_service.cc
M src/kudu/tablet/delta_stats.cc
M src/kudu/tablet/ops/op_driver.cc
M src/kudu/tablet/tablet_replica.cc
M src/kudu/tserver/tablet_service.cc
M src/kudu/util/threadpool.cc
14 files changed, 60 insertions(+), 116 deletions(-)

Approvals:
  Kudu Jenkins: Verified
  Andrew Wong: Looks good to me, approved

-- 
To view, visit http://gerrit.cloudera.org:8080/17156
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Icd0532c0c6403f9bccfa59413a103d812633f4f6
Gerrit-Change-Number: 17156
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Bankim Bhavsar <ba...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)

[kudu-CR] [gutil] use C++17's [[fallthrough]] attribute

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/17156 )

Change subject: [gutil] use C++17's [[fallthrough]] attribute
......................................................................


Patch Set 1: Code-Review+2

(1 comment)

http://gerrit.cloudera.org:8080/#/c/17156/1/src/kudu/master/master_service.cc
File src/kudu/master/master_service.cc:

http://gerrit.cloudera.org:8080/#/c/17156/1/src/kudu/master/master_service.cc@845
PS1, Line 845:     case MasterFeatures::RANGE_PARTITION_BOUNDS:    [[fallthrough]];
> warning: switch has 2 consecutive identical branches [bugprone-branch-clone
Hm, not sure what this is saying. For consecutive fallthroughs should there only be one [[fallthrough]]?



-- 
To view, visit http://gerrit.cloudera.org:8080/17156
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Icd0532c0c6403f9bccfa59413a103d812633f4f6
Gerrit-Change-Number: 17156
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Bankim Bhavsar <ba...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Mon, 08 Mar 2021 06:21:14 +0000
Gerrit-HasComments: Yes