Skip to content

Commit

Permalink
a small cleanup: removed unnecessary semicolons
Browse files Browse the repository at this point in the history
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 <[email protected]>
Tested-by: Kudu Jenkins
  • Loading branch information
alexeyserbin committed May 30, 2019
1 parent 3cbc025 commit 62123b0
Show file tree
Hide file tree
Showing 19 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion src/kudu/client/client-unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
2 changes: 1 addition & 1 deletion src/kudu/clock/hybrid_clock-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
2 changes: 1 addition & 1 deletion src/kudu/consensus/consensus_meta.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion src/kudu/consensus/consensus_queue.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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>",
Expand Down
2 changes: 1 addition & 1 deletion src/kudu/consensus/time_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
6 changes: 3 additions & 3 deletions src/kudu/gutil/casts.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/kudu/hms/hms_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/kudu/integration-tests/mini_cluster_fs_inspector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/kudu/integration-tests/stop_tablet-itest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion src/kudu/integration-tests/timestamp_advancement-itest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/kudu/tablet/tablet_replica-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/kudu/tools/ksck_checksum.cc
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ bool KsckChecksumManager::HasOpenTsSlotsUnlocked() const {
return true;
}
}
return false;;
return false;
}

string KsckChecksumManager::OpenTsSlotSummaryString() const {
Expand Down
2 changes: 1 addition & 1 deletion src/kudu/tools/kudu-admin-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/kudu/tools/kudu-tool-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/kudu/util/debug/trace_event_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions src/kudu/util/flag_tags.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//
Expand Down
2 changes: 1 addition & 1 deletion src/kudu/util/net/net_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/kudu/util/thread.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion src/kudu/util/user.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 62123b0

Please sign in to comment.