Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#24012] YSQL: Replace deprecated function shared_ptr::unique to fix …
…macos compiler error Summary: An unknown change started causing compilation errors on macos. Fix these compiler errors. Error 1: deprecated function error ``` /------------------------------------------------------------------------------- | COMPILATION FAILED |------------------------------------------------------------------------------- ../../src/yb/util/debug/long_operation_tracker.cc:119:22: error: no member named 'unique' in 'std::shared_ptr<yb::LongOperationTracker::TrackedOperation>' 119 | if (!operation.unique()) { | ~~~~~~~~~ ^ ../../src/yb/util/debug/long_operation_tracker.cc:124:24: error: no member named 'unique' in 'std::shared_ptr<yb::LongOperationTracker::TrackedOperation>' 124 | if (!operation.unique()) { | ~~~~~~~~~ ^ 2 errors generated. Input files: src/yb/util/CMakeFiles/yb_util.dir/debug/long_operation_tracker.cc.o /Users/tfoucher/code/yugabyte-db3/src/yb/util/debug/long_operation_tracker.cc Output file (from -o): src/yb/util/CMakeFiles/yb_util.dir/debug/long_operation_tracker.cc.o \------------------------------------------------------------------------------- ``` Error2: unused variable error ``` /------------------------------------------------------------------------------- | COMPILATION FAILED |------------------------------------------------------------------------------- ../../src/yb/docdb/docdb_util.cc:46:19: error: unused variable 'kEmptyLogPrefix' [-Werror,-Wunused-const-variable] 46 | const std::string kEmptyLogPrefix; | ^~~~~~~~~~~~~~~ 1 error generated. Input files: src/yb/docdb/CMakeFiles/yb_docdb.dir/docdb_util.cc.o /Users/pbalivada/code/xcode/src/yb/docdb/docdb_util.cc Output file (from -o): src/yb/docdb/CMakeFiles/yb_docdb.dir/docdb_util.cc.o \------------------------------------------------------------------------------- ``` Error 3: unused variable error ``` /------------------------------------------------------------------------------- | COMPILATION FAILED |------------------------------------------------------------------------------- ../../src/yb/util/metrics-test.cc:64:21: error: unused variable 'kTableId' [-Werror,-Wunused-const-variable] 64 | static const string kTableId = "table_id"; | ^~~~~~~~ 1 error generated. Input files: src/yb/util/CMakeFiles/metrics-test.dir/metrics-test.cc.o /Users/pbalivada/code/xcode/src/yb/util/metrics-test.cc Output file (from -o): src/yb/util/CMakeFiles/metrics-test.dir/metrics-test.cc.o \------------------------------------------------------------------------------- ``` Fixes #24012 Jira: DB-12899 Test Plan: Jenkins Reviewers: hsunder Reviewed By: hsunder Subscribers: hsunder, ybase Differential Revision: https://phorge.dev.yugabyte.com/D38164
- Loading branch information