From 7bb717d2f9c099a0bca6f7b74b6217fe465cf656 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Sun, 19 Mar 2023 19:05:32 +0200 Subject: [PATCH] treewide: prevent redefining names gcc dislikes a member name that matches a type name, as it changes the type name retroactively. Fix by fully-qualifying the type name, so it is not changed by the newly-introduced member. --- cell_locking.hh | 2 +- cql3/statements/raw/describe_statement.hh | 4 ++-- db/view/view.hh | 2 +- schema/schema.hh | 4 ++-- tasks/task_manager.hh | 8 ++++---- test/lib/sstable_test_env.hh | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cell_locking.hh b/cell_locking.hh index 90dd2c020a..d3be6c89fd 100644 --- a/cell_locking.hh +++ b/cell_locking.hh @@ -175,7 +175,7 @@ private: } class hasher { - const schema* _schema; // pointer instead of reference for default assignment + const ::schema* _schema; // pointer instead of reference for default assignment public: explicit hasher(const schema& s) : _schema(&s) { } diff --git a/cql3/statements/raw/describe_statement.hh b/cql3/statements/raw/describe_statement.hh index 25323a4d44..ab28200478 100644 --- a/cql3/statements/raw/describe_statement.hh +++ b/cql3/statements/raw/describe_statement.hh @@ -51,10 +51,10 @@ private: bool only_keyspace; }; struct describe_listing { - element_type element_type; + describe_statement::element_type element_type; }; struct describe_element { - element_type element_type; + describe_statement::element_type element_type; std::optional keyspace; sstring name; }; diff --git a/db/view/view.hh b/db/view/view.hh index 0308b92333..a657109015 100644 --- a/db/view/view.hh +++ b/db/view/view.hh @@ -111,7 +111,7 @@ public: return _row.is_live(s, column_kind(), base_tombstone, now); } - column_kind column_kind() const { + ::column_kind column_kind() const { return _key.has_value() ? column_kind::regular_column : column_kind::static_column; } diff --git a/schema/schema.hh b/schema/schema.hh index d9e3122589..f7f9cdbe15 100644 --- a/schema/schema.hh +++ b/schema/schema.hh @@ -614,12 +614,12 @@ private: int32_t _min_index_interval = DEFAULT_MIN_INDEX_INTERVAL; int32_t _max_index_interval = 2048; int32_t _memtable_flush_period = 0; - speculative_retry _speculative_retry = ::speculative_retry(speculative_retry::type::PERCENTILE, 0.99); + ::speculative_retry _speculative_retry = ::speculative_retry(speculative_retry::type::PERCENTILE, 0.99); // This is the compaction strategy that will be used by default on tables which don't have one explicitly specified. sstables::compaction_strategy_type _compaction_strategy = sstables::compaction_strategy_type::size_tiered; std::map _compaction_strategy_options; bool _compaction_enabled = true; - caching_options _caching_options; + ::caching_options _caching_options; table_schema_version _version; std::unordered_map _dropped_columns; std::map _collections; diff --git a/tasks/task_manager.hh b/tasks/task_manager.hh index 04d49c46ac..dcca3feb6c 100644 --- a/tasks/task_manager.hh +++ b/tasks/task_manager.hh @@ -48,7 +48,7 @@ private: modules _modules; config _cfg; seastar::abort_source _as; - optimized_optional _abort_subscription; + optimized_optional _abort_subscription; serialized_action _update_task_ttl_action; utils::observer _task_ttl_observer; uint32_t _task_ttl; @@ -99,8 +99,8 @@ public: foreign_task_vector _children; shared_promise<> _done; module_ptr _module; - abort_source _as; - optimized_optional _shutdown_subscription; + seastar::abort_source _as; + optimized_optional _shutdown_subscription; public: impl(module_ptr module, task_id id, uint64_t sequence_number, std::string keyspace, std::string table, std::string entity, task_id parent_id) noexcept; virtual ~impl() = default; @@ -203,7 +203,7 @@ public: } }; public: - task_manager(config cfg, abort_source& as) noexcept; + task_manager(config cfg, seastar::abort_source& as) noexcept; task_manager() noexcept; modules& get_modules() noexcept; diff --git a/test/lib/sstable_test_env.hh b/test/lib/sstable_test_env.hh index 85e9faa6c9..54add7367b 100644 --- a/test/lib/sstable_test_env.hh +++ b/test/lib/sstable_test_env.hh @@ -51,7 +51,7 @@ class test_env { tmpdir dir; std::unique_ptr db_config; directory_semaphore dir_sem; - cache_tracker cache_tracker; + ::cache_tracker cache_tracker; gms::feature_service feature_service; db::nop_large_data_handler nop_ld_handler; test_env_sstables_manager mgr;