kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ale...@apache.org
Subject [kudu] 04/04: a small cleanup: removed unnecessary semicolons
Date Thu, 30 May 2019 05:05:48 GMT
This is an automated email from the ASF dual-hosted git repository.

alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit 62123b097abf14d5a71fb3d26c0909ce2bfde9f4
Author: Alexey Serbin <alexey@apache.org>
AuthorDate: Wed May 29 19:22:18 2019 -0700

    a small cleanup: removed unnecessary semicolons
    
    The motivation for this change was finding a few warnings by QtCreator's
    built-in static analysis tool while browsing through the code.
    
    This patch does not contain any functional changes.
    
    Change-Id: I62cab3048cb9556a546625393cc5b73374a3e088
    Reviewed-on: http://gerrit.cloudera.org:8080/13462
    Reviewed-by: Adar Dembo <adar@cloudera.com>
    Tested-by: Kudu Jenkins
---
 src/kudu/client/client-unittest.cc                        |  2 +-
 src/kudu/clock/hybrid_clock-test.cc                       |  2 +-
 src/kudu/consensus/consensus_meta.cc                      |  2 +-
 src/kudu/consensus/consensus_queue.cc                     |  2 +-
 src/kudu/consensus/time_manager.cc                        |  2 +-
 src/kudu/gutil/casts.h                                    |  6 +++---
 src/kudu/hms/hms_client.h                                 |  2 +-
 src/kudu/integration-tests/mini_cluster_fs_inspector.cc   |  4 ++--
 src/kudu/integration-tests/stop_tablet-itest.cc           |  2 +-
 src/kudu/integration-tests/timestamp_advancement-itest.cc |  2 +-
 src/kudu/tablet/tablet_replica-test.cc                    |  4 ++--
 src/kudu/tools/ksck_checksum.cc                           |  2 +-
 src/kudu/tools/kudu-admin-test.cc                         |  2 +-
 src/kudu/tools/kudu-tool-test.cc                          |  2 +-
 src/kudu/util/debug/trace_event_impl.cc                   |  4 ++--
 src/kudu/util/flag_tags.h                                 | 10 +++++-----
 src/kudu/util/net/net_util.cc                             |  2 +-
 src/kudu/util/thread.cc                                   |  2 +-
 src/kudu/util/user.cc                                     |  2 +-
 19 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/src/kudu/client/client-unittest.cc b/src/kudu/client/client-unittest.cc
index 3cf76f8..da58bfa 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 e219f2c..9282bfd 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 355aba9..98b4d34 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 41815ad..5887b39 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<simple_spinlock> lock(queue_lock_);
   out << "<h3>Watermarks</h3>" << endl;
-  out << "<table>" << endl;;
+  out << "<table>" << endl;
   out << "  <tr><th>Peer</th><th>Watermark</th></tr>"
<< endl;
   for (const PeersMap::value_type& entry : peers_map_) {
     out << Substitute("  <tr><td>$0</td><td>$1</td></tr>",
diff --git a/src/kudu/consensus/time_manager.cc b/src/kudu/consensus/time_manager.cc
index 7a5083d..a83f606 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 474e083..e3ba9f2 100644
--- a/src/kudu/gutil/casts.h
+++ b/src/kudu/gutil/casts.h
@@ -252,9 +252,9 @@ class enum_limits<ENUM_TYPE> { \
   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 2effe11..c21d612 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 8c186a5..b6bd65f 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 dfcf836..2b26d25 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<TabletReplica> 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 b0b9d51..344bcf6 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 a0960cc..a9f7382 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 c87211c..1217d05 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 23d7b06..4be0f27 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 26b042e..f01a73c 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 ad97149..9b1d919 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 bf0c400..e6a5d78 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 6e719d0..ecb5bd4 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 e134a27..22106da 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 abea3e6..e3c7fd4 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);


Mime
View raw message