diff --git a/src/kudu/client/client-unittest.cc b/src/kudu/client/client-unittest.cc index 3cf76f8bd6..da58bfa7a5 100644 --- a/src/kudu/client/client-unittest.cc +++ b/src/kudu/client/client-unittest.cc @@ -78,7 +78,7 @@ TEST(ClientUnitTest, TestSchemaBuilder_KeyNotFirstColumn) { KuduSchema s; KuduSchemaBuilder b; b.AddColumn("key")->Type(KuduColumnSchema::INT32); - b.AddColumn("x")->Type(KuduColumnSchema::INT32)->NotNull()->PrimaryKey();; + b.AddColumn("x")->Type(KuduColumnSchema::INT32)->NotNull()->PrimaryKey(); b.AddColumn("x")->Type(KuduColumnSchema::INT32); ASSERT_EQ("Invalid argument: primary key column must be the first column", b.Build(&s).ToString()); diff --git a/src/kudu/clock/hybrid_clock-test.cc b/src/kudu/clock/hybrid_clock-test.cc index e219f2cbd8..9282bfd4bc 100644 --- a/src/kudu/clock/hybrid_clock-test.cc +++ b/src/kudu/clock/hybrid_clock-test.cc @@ -271,7 +271,7 @@ TEST_F(HybridClockTest, TestIsAfter) { // into the future. void StresserThread(HybridClock* clock, AtomicBool* stop) { Random rng(GetRandomSeed32()); - Timestamp prev(0);; + Timestamp prev(0); while (!stop->Load()) { Timestamp t = clock->Now(); CHECK_GT(t.value(), prev.value()); diff --git a/src/kudu/consensus/consensus_meta.cc b/src/kudu/consensus/consensus_meta.cc index 355aba95c9..98b4d34bbe 100644 --- a/src/kudu/consensus/consensus_meta.cc +++ b/src/kudu/consensus/consensus_meta.cc @@ -150,7 +150,7 @@ bool ConsensusMetadata::has_pending_config() const { const RaftConfigPB& ConsensusMetadata::PendingConfig() const { DFAKE_SCOPED_RECURSIVE_LOCK(fake_lock_); - return GetConfig(PENDING_CONFIG);; + return GetConfig(PENDING_CONFIG); } void ConsensusMetadata::clear_pending_config() { diff --git a/src/kudu/consensus/consensus_queue.cc b/src/kudu/consensus/consensus_queue.cc index 41815adb2c..5887b39272 100644 --- a/src/kudu/consensus/consensus_queue.cc +++ b/src/kudu/consensus/consensus_queue.cc @@ -1344,7 +1344,7 @@ void PeerMessageQueue::DumpToHtml(std::ostream& out) const { std::lock_guard lock(queue_lock_); out << "

Watermarks

" << endl; - out << "" << endl;; + out << "
" << endl; out << " " << endl; for (const PeersMap::value_type& entry : peers_map_) { out << Substitute(" ", diff --git a/src/kudu/consensus/time_manager.cc b/src/kudu/consensus/time_manager.cc index 7a5083d5eb..a83f606689 100644 --- a/src/kudu/consensus/time_manager.cc +++ b/src/kudu/consensus/time_manager.cc @@ -146,7 +146,7 @@ void TimeManager::AdvanceSafeTimeWithMessage(const ReplicateMsg& message) { void TimeManager::AdvanceSafeTime(Timestamp safe_time) { Lock l(lock_); - CHECK_EQ(mode_, NON_LEADER) << "Cannot advance safe time by timestamp in leader mode.";; + CHECK_EQ(mode_, NON_LEADER) << "Cannot advance safe time by timestamp in leader mode."; AdvanceSafeTimeAndWakeUpWaitersUnlocked(safe_time); } diff --git a/src/kudu/gutil/casts.h b/src/kudu/gutil/casts.h index 474e083686..e3ba9f270a 100644 --- a/src/kudu/gutil/casts.h +++ b/src/kudu/gutil/casts.h @@ -252,9 +252,9 @@ class enum_limits { \ static const ENUM_TYPE min_enumerator = ENUM_MIN; \ static const ENUM_TYPE max_enumerator = ENUM_MAX; \ static const bool is_specialized = true; \ - COMPILE_ASSERT(ENUM_MIN >= INT_MIN, enumerator_too_negative_for_int); \ - COMPILE_ASSERT(ENUM_MAX <= INT_MAX, enumerator_too_positive_for_int); \ -}; + COMPILE_ASSERT((ENUM_MIN) >= INT_MIN, enumerator_too_negative_for_int); \ + COMPILE_ASSERT((ENUM_MAX) <= INT_MAX, enumerator_too_positive_for_int); \ +} // The loose enum test/cast is actually the more complicated one, // because of the problem of finding the bounds. diff --git a/src/kudu/hms/hms_client.h b/src/kudu/hms/hms_client.h index 2effe11ce4..c21d612707 100644 --- a/src/kudu/hms/hms_client.h +++ b/src/kudu/hms/hms_client.h @@ -62,7 +62,7 @@ class HmsClient { static const char* const kKuduTableIdKey; static const char* const kKuduTableNameKey; static const char* const kKuduMasterAddrsKey; - static const char* const kKuduMasterEventKey;; + static const char* const kKuduMasterEventKey; static const char* const kStorageHandlerKey; static const char* const kKuduStorageHandler; static const char* const kHiveFilterFieldParams; diff --git a/src/kudu/integration-tests/mini_cluster_fs_inspector.cc b/src/kudu/integration-tests/mini_cluster_fs_inspector.cc index 8c186a54a8..b6bd65f6b4 100644 --- a/src/kudu/integration-tests/mini_cluster_fs_inspector.cc +++ b/src/kudu/integration-tests/mini_cluster_fs_inspector.cc @@ -143,14 +143,14 @@ Status MiniClusterFsInspector::CheckNoDataOnTS(int ts_idx) { if (CountFilesInDir(JoinPathSegments(wal_root, FsManager::kConsensusMetadataDirName)) > 0) { return Status::IllegalState("consensus metadata still exists", wal_root); } - return Status::OK();; + return Status::OK(); } Status MiniClusterFsInspector::CheckNoData() { for (int i = 0; i < cluster_->num_tablet_servers(); i++) { RETURN_NOT_OK(CheckNoDataOnTS(i)); } - return Status::OK();; + return Status::OK(); } string MiniClusterFsInspector::GetTabletSuperBlockPathOnTS(int ts_idx, diff --git a/src/kudu/integration-tests/stop_tablet-itest.cc b/src/kudu/integration-tests/stop_tablet-itest.cc index dfcf836bfe..2b26d25554 100644 --- a/src/kudu/integration-tests/stop_tablet-itest.cc +++ b/src/kudu/integration-tests/stop_tablet-itest.cc @@ -94,7 +94,7 @@ class StopTabletITest : public MiniClusterITestBase, void StopTablet(const string& tablet_id, int tserver_num = 0) { scoped_refptr replica; MiniTabletServer* ts = cluster_->mini_tablet_server(tserver_num); - LOG(INFO) << Substitute("Stopping T $0 P $1", tablet_id, ts->uuid());; + LOG(INFO) << Substitute("Stopping T $0 P $1", tablet_id, ts->uuid()); ASSERT_OK(ts->server()->tablet_manager()->GetTabletReplica(tablet_id, &replica)); replica->tablet()->Stop(); diff --git a/src/kudu/integration-tests/timestamp_advancement-itest.cc b/src/kudu/integration-tests/timestamp_advancement-itest.cc index b0b9d5199c..344bcf68f3 100644 --- a/src/kudu/integration-tests/timestamp_advancement-itest.cc +++ b/src/kudu/integration-tests/timestamp_advancement-itest.cc @@ -118,7 +118,7 @@ class TimestampAdvancementITest : public MiniClusterITestBase { NO_FATALS(StartCluster(3)); // Write some rows to the cluster. - TestWorkload write(cluster_.get());; + TestWorkload write(cluster_.get()); // Set a low batch size so we have finer-grained control over flushing of // the WAL. Too large, and the WAL may end up flushing in the background. diff --git a/src/kudu/tablet/tablet_replica-test.cc b/src/kudu/tablet/tablet_replica-test.cc index a0960ccd44..a9f7382f9b 100644 --- a/src/kudu/tablet/tablet_replica-test.cc +++ b/src/kudu/tablet/tablet_replica-test.cc @@ -105,8 +105,8 @@ using rpc::ResultTracker; using std::shared_ptr; using std::string; using std::unique_ptr; -using tserver::AlterSchemaRequestPB;; -using tserver::AlterSchemaResponsePB;; +using tserver::AlterSchemaRequestPB; +using tserver::AlterSchemaResponsePB; using tserver::WriteRequestPB; using tserver::WriteResponsePB; diff --git a/src/kudu/tools/ksck_checksum.cc b/src/kudu/tools/ksck_checksum.cc index c87211c197..1217d05b76 100644 --- a/src/kudu/tools/ksck_checksum.cc +++ b/src/kudu/tools/ksck_checksum.cc @@ -192,7 +192,7 @@ bool KsckChecksumManager::HasOpenTsSlotsUnlocked() const { return true; } } - return false;; + return false; } string KsckChecksumManager::OpenTsSlotSummaryString() const { diff --git a/src/kudu/tools/kudu-admin-test.cc b/src/kudu/tools/kudu-admin-test.cc index 23d7b06022..4be0f2708d 100644 --- a/src/kudu/tools/kudu-admin-test.cc +++ b/src/kudu/tools/kudu-admin-test.cc @@ -1749,7 +1749,7 @@ TEST_F(AdminCliTest, TestDescribeTable) { builder.AddColumn("timestamp_val")->Type(KuduColumnSchema::UNIXTIME_MICROS); builder.AddColumn("string_val")->Type(KuduColumnSchema::STRING) ->Encoding(KuduColumnStorageAttributes::EncodingType::PREFIX_ENCODING) - ->Default(KuduValue::CopyString(Slice("hello")));; + ->Default(KuduValue::CopyString(Slice("hello"))); builder.AddColumn("bool_val")->Type(KuduColumnSchema::BOOL) ->Default(KuduValue::FromBool(false)); builder.AddColumn("float_val")->Type(KuduColumnSchema::FLOAT); diff --git a/src/kudu/tools/kudu-tool-test.cc b/src/kudu/tools/kudu-tool-test.cc index 26b042e1d7..f01a73c9ca 100644 --- a/src/kudu/tools/kudu-tool-test.cc +++ b/src/kudu/tools/kudu-tool-test.cc @@ -817,7 +817,7 @@ class ToolTestCopyTableParameterized : builder.AddColumn("timestamp_val")->Type(client::KuduColumnSchema::UNIXTIME_MICROS); builder.AddColumn("string_val")->Type(client::KuduColumnSchema::STRING) ->Encoding(KuduColumnStorageAttributes::EncodingType::PREFIX_ENCODING) - ->Default(KuduValue::CopyString(Slice("hello")));; + ->Default(KuduValue::CopyString(Slice("hello"))); builder.AddColumn("bool_val")->Type(client::KuduColumnSchema::BOOL) ->Default(KuduValue::FromBool(false)); builder.AddColumn("float_val")->Type(client::KuduColumnSchema::FLOAT); diff --git a/src/kudu/util/debug/trace_event_impl.cc b/src/kudu/util/debug/trace_event_impl.cc index ad9714900d..9b1d919257 100644 --- a/src/kudu/util/debug/trace_event_impl.cc +++ b/src/kudu/util/debug/trace_event_impl.cc @@ -565,7 +565,7 @@ void TraceEvent::Initialize( unsigned char flags) { timestamp_ = timestamp; thread_timestamp_ = thread_timestamp; - duration_ = -1;; + duration_ = -1; id_ = id; category_group_enabled_ = category_group_enabled; name_ = name; @@ -639,7 +639,7 @@ void TraceEvent::Initialize( void TraceEvent::Reset() { // Only reset fields that won't be initialized in Initialize(), or that may // hold references to other objects. - duration_ = -1;; + duration_ = -1; parameter_copy_storage_ = nullptr; for (int i = 0; i < kTraceMaxNumArgs && arg_names_[i]; ++i) convertable_values_[i] = nullptr; diff --git a/src/kudu/util/flag_tags.h b/src/kudu/util/flag_tags.h index bf0c400f64..e6a5d78f50 100644 --- a/src/kudu/util/flag_tags.h +++ b/src/kudu/util/flag_tags.h @@ -136,12 +136,12 @@ struct FlagTags { // This also validates that 'tag' is a valid flag as defined in the FlagTags // enum above. #define TAG_FLAG(flag_name, tag) \ - COMPILE_ASSERT(sizeof(decltype(FLAGS_##flag_name)), flag_does_not_exist); \ - COMPILE_ASSERT(sizeof(::kudu::FlagTags::tag), invalid_tag); \ - namespace { \ + namespace { \ ::kudu::flag_tags_internal::FlagTagger t_##flag_name##_##tag( \ - AS_STRING(flag_name), AS_STRING(tag)); \ - } + AS_STRING(flag_name), AS_STRING(tag)); \ + } \ + COMPILE_ASSERT(sizeof(decltype(FLAGS_##flag_name)), flag_does_not_exist); \ + COMPILE_ASSERT(sizeof(::kudu::FlagTags::tag), invalid_tag) // Fetch the list of flags associated with the given flag. // diff --git a/src/kudu/util/net/net_util.cc b/src/kudu/util/net/net_util.cc index 6e719d089d..ecb5bd4a94 100644 --- a/src/kudu/util/net/net_util.cc +++ b/src/kudu/util/net/net_util.cc @@ -494,7 +494,7 @@ string GetBindIpForDaemon(int index, BindMode bind_mode) { case BindMode::LOOPBACK: return kLoopbackIpAddr; default: - LOG(FATAL) << "unknown bind mode";; + LOG(FATAL) << "unknown bind mode"; } } diff --git a/src/kudu/util/thread.cc b/src/kudu/util/thread.cc index e134a27aed..22106da950 100644 --- a/src/kudu/util/thread.cc +++ b/src/kudu/util/thread.cc @@ -131,7 +131,7 @@ static uint64_t GetCpuSTime() { static uint64_t GetVoluntaryContextSwitches() { rusage ru; CHECK_ERR(getrusage(RUSAGE_SELF, &ru)); - return ru.ru_nvcsw;; + return ru.ru_nvcsw; } static uint64_t GetInVoluntaryContextSwitches() { diff --git a/src/kudu/util/user.cc b/src/kudu/util/user.cc index abea3e69f7..e3c7fd4450 100644 --- a/src/kudu/util/user.cc +++ b/src/kudu/util/user.cc @@ -46,7 +46,7 @@ Status DoGetLoggedInUser(string* user_name) { if (override_username && strlen(override_username)) { VLOG(1) << "Overriding logged-in user name to " << override_username; *user_name = override_username; - return Status::OK();; + return Status::OK(); } DCHECK(user_name != nullptr);
PeerWatermark
$0$1