Skip to content

Commit

Permalink
feat(StoneDB 8.0): Fix up the compiling extra-semi warnings. (stoneat…
Browse files Browse the repository at this point in the history
  • Loading branch information
lujiashun committed Sep 27, 2022
1 parent e2721a8 commit 234eb02
Show file tree
Hide file tree
Showing 36 changed files with 85 additions and 85 deletions.
2 changes: 1 addition & 1 deletion storage/tianmu/base/core/execution_stage.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class execution_stage {
}));
_flush_scheduled = true;
return true;
};
}

/// Checks whether there are pending operations.
///
Expand Down
4 changes: 2 additions & 2 deletions storage/tianmu/base/core/expiring_fifo.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ namespace base {

template <typename T>
struct dummy_expiry {
void operator()(T &) noexcept {};
void operator()(T &) noexcept {}
};

template <typename... T>
struct promise_expiry {
void operator()(promise<T...> &pr) noexcept { pr.set_exception(std::make_exception_ptr(timed_out_error())); };
void operator()(promise<T...> &pr) noexcept { pr.set_exception(std::make_exception_ptr(timed_out_error())); }
};

/// Container for elements with support for expiration of entries.
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/base/core/future.h
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ class future {
} catch (...) {
return result.rethrow_with_nested();
}
};
}
};

/// \brief Terminate the program if this future fails.
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/base/core/reactor.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ class smp_message_queue {
// OSv-specific file-descriptor-less mechanisms (reactor_backend_osv).
class reactor_backend {
public:
virtual ~reactor_backend(){};
virtual ~reactor_backend(){}
// wait_and_process() waits for some events to become available, and
// processes one or more of them. If block==false, it doesn't wait,
// and just processes events that have already happened, if any.
Expand Down
4 changes: 2 additions & 2 deletions storage/tianmu/base/net/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class get_impl;

class udp_datagram_impl {
public:
virtual ~udp_datagram_impl(){};
virtual ~udp_datagram_impl(){}
virtual ipv4_addr get_src() = 0;
virtual ipv4_addr get_dst() = 0;
virtual uint16_t get_dst_port() = 0;
Expand All @@ -104,7 +104,7 @@ class udp_datagram final {
std::unique_ptr<udp_datagram_impl> _impl;

public:
udp_datagram(std::unique_ptr<udp_datagram_impl> &&impl) : _impl(std::move(impl)){};
udp_datagram(std::unique_ptr<udp_datagram_impl> &&impl) : _impl(std::move(impl)){}
ipv4_addr get_src() { return _impl->get_src(); }
ipv4_addr get_dst() { return _impl->get_dst(); }
uint16_t get_dst_port() { return _impl->get_dst_port(); }
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/base/net/posix_stack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ class posix_udp_channel : public udp_channel_impl {
}
virtual ~posix_udp_channel() {
if (!_closed) close();
};
}
virtual future<udp_datagram> receive() override;
future<> send(ipv4_addr dst, const char *msg) override;
future<> send(ipv4_addr dst, packet p) override;
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/base/net/posix_stack.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class posix_network_stack : public network_stack {
static future<std::unique_ptr<network_stack>> create() {
return make_ready_future<std::unique_ptr<network_stack>>(std::unique_ptr<network_stack>(new posix_network_stack()));
}
virtual bool has_per_core_namespace() override { return _reuseport; };
virtual bool has_per_core_namespace() override { return _reuseport; }
};

class posix_ap_network_stack : public posix_network_stack {
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/base/net/stack.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class server_socket_impl {

class udp_channel_impl {
public:
virtual ~udp_channel_impl(){};
virtual ~udp_channel_impl(){}
virtual future<udp_datagram> receive() = 0;
virtual future<> send(ipv4_addr dst, const char *msg) = 0;
virtual future<> send(ipv4_addr dst, packet p) = 0;
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/core/bloom_block.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ inline int Slice::compare(const Slice &b) const {

class FilterPolicy {
public:
virtual ~FilterPolicy(){};
virtual ~FilterPolicy(){}

// Return the name of this policy. Note that if the filter encoding
// changes in an incompatible way, the name returned by this method
Expand Down
8 changes: 4 additions & 4 deletions storage/tianmu/core/column_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ struct ColumnType {
uint GetInternalSize() const { return internal_size; }
// Use in cases where actual string length is less then declared, before
// materialization of Attr
void OverrideInternalSize(uint size) { internal_size = size; };
void OverrideInternalSize(uint size) { internal_size = size; }
int GetDisplaySize() const { return display_size; }
bool IsLookup() const { return fmt == common::PackFmt::LOOKUP; }
ColumnType RemovedLookup() const;
Expand All @@ -112,9 +112,9 @@ struct ColumnType {
}
}

bool IsKnown() const { return type != common::CT::UNK; };
bool IsFixed() const { return ATI::IsFixedNumericType(type); };
bool IsFloat() const { return ATI::IsRealType(type); };
bool IsKnown() const { return type != common::CT::UNK; }
bool IsFixed() const { return ATI::IsFixedNumericType(type); }
bool IsFloat() const { return ATI::IsRealType(type); }
bool IsInt() const { return IsFixed() && scale == 0; }
bool IsString() const { return ATI::IsStringType(type); }
bool IsDateTime() const { return ATI::IsDateTimeType(type); }
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/core/compiled_query.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class CompiledQuery final {
alias(NULL),
n1(common::NULL_VALUE_64),
n2(common::NULL_VALUE_64),
si(){};
si(){}

CQStep(const CQStep &);

Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/core/descriptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class SortDescriptor {
public:
vcolumn::VirtualColumn *vc;
int dir; // ordering direction: 0 - ascending, 1 - descending
SortDescriptor() : vc(NULL), dir(0){};
SortDescriptor() : vc(NULL), dir(0){}
int operator==(const SortDescriptor &sec) { return (dir == sec.dir) && (vc == sec.vc); }
};

Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/core/dimension_group.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class DimensionGroup {
// note: retrieving a value depends on DimensionGroup type
Iterator() { valid = false; }
Iterator(const Iterator &sec) { valid = sec.valid; }
virtual ~Iterator(){};
virtual ~Iterator(){}

virtual void operator++() = 0;
virtual void Rewind() = 0;
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/core/dimension_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace core {
class DimensionVector {
public:
DimensionVector() = default;
DimensionVector(int no_dims) : v(no_dims){};
DimensionVector(int no_dims) : v(no_dims){}
DimensionVector(const DimensionVector &sec) = default;
~DimensionVector() = default;

Expand Down
10 changes: 5 additions & 5 deletions storage/tianmu/core/filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Filter final : public mm::TraceableObject {
// original), but it ok as the copy uses pools and mutexes from the original
static Filter *ShallowCopy(Filter &f);

mm::TO_TYPE TraceableType() const override { return mm::TO_TYPE::TO_FILTER; };
mm::TO_TYPE TraceableType() const override { return mm::TO_TYPE::TO_FILTER; }
// Copying operation
std::unique_ptr<Filter> Clone() const;

Expand Down Expand Up @@ -152,7 +152,7 @@ class Filter final : public mm::TraceableObject {
// nonempty block.
// Otherwise it is an average number of ones in nonempty blocks.

boost::pool<HeapAllocator> *GetBitBlockPool() { return bit_block_pool; };
boost::pool<HeapAllocator> *GetBitBlockPool() { return bit_block_pool; }
friend class FilterOnesIterator;
friend class FilterOnesIteratorOrdered;

Expand All @@ -161,12 +161,12 @@ class Filter final : public mm::TraceableObject {
Block *GetBlock(size_t b) const {
DEBUG_ASSERT(b < no_blocks);
return blocks[b];
};
}
uchar GetBlockStatus(size_t i) {
DEBUG_ASSERT(i < no_blocks);
return block_status[i];
};
uint32_t GetPower() { return no_power; };
}
uint32_t GetPower() { return no_power; }
bool GetBlockChangeStatus(uint32_t n) const {
DEBUG_ASSERT(n < no_blocks);
return block_changed[n];
Expand Down
4 changes: 2 additions & 2 deletions storage/tianmu/core/joiner_mapped.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class JoinerMapped : public TwoDimensionalJoiner {

class JoinerParallelMapped : public JoinerMapped {
public:
JoinerParallelMapped(MultiIndex *_mind, TempTable *_table, JoinTips &_tips) : JoinerMapped(_mind, _table, _tips){};
JoinerParallelMapped(MultiIndex *_mind, TempTable *_table, JoinTips &_tips) : JoinerMapped(_mind, _table, _tips){}

void ExecuteJoinConditions(Condition &cond) override;

Expand Down Expand Up @@ -126,7 +126,7 @@ class OffsetMapFunction : public JoinerMapFunction {
class MultiMapsFunction : public JoinerMapFunction {
public:
MultiMapsFunction(Transaction *_m_conn) : JoinerMapFunction(_m_conn) {}
~MultiMapsFunction(){};
~MultiMapsFunction(){}

bool Init(vcolumn::VirtualColumn *vc, MIIterator &mit);

Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/core/just_a_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class JustATable : public std::enable_shared_from_this<JustATable> {
//! Returns column value in the form required by complex expressions
ValueOrNull GetComplexValue(const int64_t obj, const int attr);

virtual ~JustATable(){};
virtual ~JustATable(){}
};

} // namespace core
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/core/pack_orderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class PackOrderer {
enum class State { INIT_VAL = -1, END = -2 };

struct OrderStat {
OrderStat(int n, int o) : neutral(n), ordered(o){};
OrderStat(int n, int o) : neutral(n), ordered(o){}
int neutral;
int ordered;
};
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/core/query.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class Query final {
*/
void RemoveFromManagedList(const std::shared_ptr<RCTable> tab);

int NumOfTabs() const { return t.size(); };
int NumOfTabs() const { return t.size(); }
std::shared_ptr<RCTable> Table(size_t table_num) const {
ASSERT(table_num < t.size(), "table_num out of range: " + std::to_string(table_num));
return t[table_num];
Expand Down
6 changes: 3 additions & 3 deletions storage/tianmu/core/rc_attr.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class RCAttr final : public mm::TraceableObject, public PhysicalColumn, public P
return true;
}
return true;
};
}

/*! \brief Get a non null-terminated String from a column
*
Expand Down Expand Up @@ -198,7 +198,7 @@ class RCAttr final : public mm::TraceableObject, public PhysicalColumn, public P
size_t ComputeNaturalSize(); // natural size of data (i.e. without any compression)
// the compressed size of the attribute (for e.g. calculating compression
// ratio); may be slightly approximated
int64_t CompressedSize() const { return hdr.compressed_size; };
int64_t CompressedSize() const { return hdr.compressed_size; }
uint32_t ValueOfPackPower() const { return pss; }
uint64_t NumOfObj() const { return hdr.nr; }
uint64_t NumOfNulls() const { return hdr.nn; }
Expand Down Expand Up @@ -294,7 +294,7 @@ class RCAttr final : public mm::TraceableObject, public PhysicalColumn, public P
void LoadData(loader::ValueCache *nvs, Transaction *conn_info = NULL);
void LoadPackInfo(Transaction *trans_ = current_txn_);
void LoadProcessedData([[maybe_unused]] std::unique_ptr<system::Stream> &s,
[[maybe_unused]] size_t no_rows){/* TODO */};
[[maybe_unused]] size_t no_rows){/* TODO */}
void PreparePackForLoad();

bool SaveVersion(); // return true iff there was any change
Expand Down
12 changes: 6 additions & 6 deletions storage/tianmu/core/rough_multi_index.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ class RoughMultiIndex {
RoughMultiIndex(const RoughMultiIndex &);
~RoughMultiIndex();

common::RSValue GetPackStatus(int dim, int pack) { return rf[dim][pack]; };
void SetPackStatus(int dim, int pack, common::RSValue v) { rf[dim][pack] = v; };
common::RSValue GetPackStatus(int dim, int pack) { return rf[dim][pack]; }
void SetPackStatus(int dim, int pack, common::RSValue v) { rf[dim][pack] = v; }

int NumOfDimensions() { return no_dims; };
int NoPacks(int dim) { return no_packs[dim]; };
int NoConditions(int dim) { return int(local_desc[dim].size()); };
int NumOfDimensions() { return no_dims; }
int NoPacks(int dim) { return no_packs[dim]; }
int NoConditions(int dim) { return int(local_desc[dim].size()); }
int GlobalDescNum(int dim, int local_desc_num) { return (local_desc[dim])[local_desc_num]->desc_num; }
/*
Example of query processing steps:
Expand All @@ -47,7 +47,7 @@ class RoughMultiIndex {
optimize access for next conditions.
*/

common::RSValue *GetRSValueTable(int dim) { return rf[dim]; };
common::RSValue *GetRSValueTable(int dim) { return rf[dim]; }
common::RSValue *GetLocalDescFilter(int dim, int desc_num, bool read_only = false);
// if not exists, create one (unless read_only is set)
void ClearLocalDescFilters(); // clear all desc info, for reusing the rough
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/core/rsi_histogram.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class RSIndex_Hist final : public RSIndex {

void SaveToFile(common::TX_ID ver) override;

bool Fixed() { return hdr.fixed == 1; };
bool Fixed() { return hdr.fixed == 1; }

private:
void AppendKNs(unsigned int no_kns_to_add); // append new KNs
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/core/sorter3.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace core {
class Sorter3 : public mm::TraceableObject {
public:
Sorter3(uint _size, uint _key_bytes, uint _total_bytes)
: conn(current_txn_), key_bytes(_key_bytes), total_bytes(_total_bytes), size(_size){};
: conn(current_txn_), key_bytes(_key_bytes), total_bytes(_total_bytes), size(_size){}

static Sorter3 *CreateSorter(int64_t size, uint key_bytes, uint total_bytes, int64_t limit = -1,
int mem_modifier = 0);
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/core/temp_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ class TempTable : public JustATable {
class TempTableForSubquery : public TempTable {
public:
TempTableForSubquery(JustATable *const t, int alias, Query *q)
: TempTable(t, alias, q), template_filter(0), is_attr_for_rough(false), rough_materialized(false){};
: TempTable(t, alias, q), template_filter(0), is_attr_for_rough(false), rough_materialized(false){}
~TempTableForSubquery();

void CreateTemplateIfNotExists();
Expand Down
4 changes: 2 additions & 2 deletions storage/tianmu/core/transaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ class Transaction final {
std::shared_ptr<RCTable> GetTableByPathIfExists(const std::string &table_path);
std::shared_ptr<RCTable> GetTableByPath(const std::string &table_path);

void ExplicitLockTables() { m_explicit_lock_tables = true; };
void ExplicitUnlockTables() { m_explicit_lock_tables = false; };
void ExplicitLockTables() { m_explicit_lock_tables = true; }
void ExplicitUnlockTables() { m_explicit_lock_tables = false; }
void AddTableRD(std::shared_ptr<TableShare> &share);
void AddTableWR(std::shared_ptr<TableShare> &share);
void AddTableWRIfNeeded(std::shared_ptr<TableShare> &share);
Expand Down
4 changes: 2 additions & 2 deletions storage/tianmu/exporter/export2file.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ class select_tianmu_export : public Query_result_export {
public:
// select_tianmu_export(sql_exchange *ex);
select_tianmu_export(Query_result_export *se);
~select_tianmu_export(){};
~select_tianmu_export(){}
int prepare(List<Item> &list, Query_expression *u) /*override*/;
void SetRowCount(ha_rows x);
void SendOk(THD *thd);
sql_exchange *SqlExchange();
bool IsPrepared() const { return prepared; };
bool IsPrepared() const { return prepared; }
bool send_data(THD *thd, mem_root_deque<Item *> &items) /*override*/; // stonedb8

private:
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/index/kv_store.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class KVStore final {
public:
KVStore(const KVStore &) = delete;
//mysql_real_data_home, pls refer to the system params.
KVStore() : kv_data_dir_(mysql_real_data_home){};
KVStore() : kv_data_dir_(mysql_real_data_home){}

KVStore &operator=(const KVStore &) = delete;
virtual ~KVStore() { UnInit(); }
Expand Down
4 changes: 2 additions & 2 deletions storage/tianmu/index/rc_table_index.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ class RCTableIndex final {
class KeyIterator final {
public:
KeyIterator() = delete;
KeyIterator(const KeyIterator &sec) : valid(sec.valid), iter_(sec.iter_), rdbkey_(sec.rdbkey_){};
KeyIterator(KVTransaction *tx) : trans_(tx){};
KeyIterator(const KeyIterator &sec) : valid(sec.valid), iter_(sec.iter_), rdbkey_(sec.rdbkey_){}
KeyIterator(KVTransaction *tx) : trans_(tx){}
void ScanToKey(std::shared_ptr<RCTableIndex> tab, std::vector<std::string_view> &fields, common::Operator op);
void ScanToEdge(std::shared_ptr<RCTableIndex> tab, bool forward);
common::ErrorCode GetCurKV(std::vector<std::string> &keys, uint64_t &row);
Expand Down
2 changes: 1 addition & 1 deletion storage/tianmu/index/rdb_meta_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ class DICTManager {
bool init(rocksdb::DB *const rdb_dict, CFManager *const cf_manager_);
inline void lock() { m_mutex.lock(); }
inline void unlock() { m_mutex.unlock(); }
void cleanup(){};
void cleanup(){}
inline rocksdb::ColumnFamilyHandle *get_system_cf() const { return m_system_cfh; }
std::unique_ptr<rocksdb::WriteBatch> begin() const;
bool commit(rocksdb::WriteBatch *const batch, const bool &sync = true) const;
Expand Down
8 changes: 4 additions & 4 deletions storage/tianmu/system/channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ class Channel {
~Channel();

void addOutput(ChannelOut *output);
void setOn() { enabled_ = true; };
void setOff() { enabled_ = false; };
void setTimeStamp(bool _on = true) { time_stamp_at_lock_ = _on; };
void setOn() { enabled_ = true; }
void setOff() { enabled_ = false; }
void setTimeStamp(bool _on = true) { time_stamp_at_lock_ = _on; }
bool isOn();

Channel &lock(uint optional_sess_id = 0xFFFFFFFF);
Expand All @@ -62,7 +62,7 @@ class Channel {
Channel &operator<<(const std::string &str);

Channel &operator<<(const std::exception &exc);
Channel &operator<<(Channel &(*_Pfn)(Channel &)) { return _Pfn(*this); };
Channel &operator<<(Channel &(*_Pfn)(Channel &)) { return _Pfn(*this); }
Channel &flush();

private:
Expand Down
Loading

0 comments on commit 234eb02

Please sign in to comment.