]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
{tools,rbd,rados,rgw}: Fix Boost.Bind placeholder warning
authorAdam C. Emerson <aemerson@redhat.com>
Fri, 17 Jul 2020 00:31:33 +0000 (20:31 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Fri, 17 Jul 2020 18:17:39 +0000 (14:17 -0400)
Use of the Boost placeholders in the default namespace is
deprecated. Switching to <boost/bind/bind.hpp> defines them in
boost::placeholders and silences the warning.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
26 files changed:
src/librbd/ImageCtx.cc
src/librbd/ImageWatcher.cc
src/librbd/Operations.cc
src/librbd/Watcher.cc
src/librbd/io/CopyupRequest.cc
src/librbd/io/ObjectRequest.cc
src/librbd/operation/TrimRequest.cc
src/mgr/PyModule.cc
src/mgr/StandbyPyModules.cc
src/rbd_replay/BoundedBuffer.hpp
src/rgw/rgw_op.cc
src/rgw/rgw_rest_s3.cc
src/test/librados_test_stub/TestWatchNotify.cc
src/test/librbd/test_ImageWatcher.cc
src/tools/immutable_object_cache/CacheClient.cc
src/tools/immutable_object_cache/CacheClient.h
src/tools/immutable_object_cache/CacheServer.cc
src/tools/immutable_object_cache/CacheSession.cc
src/tools/immutable_object_cache/CacheSession.h
src/tools/rbd/action/DiskUsage.cc
src/tools/rbd/action/List.cc
src/tools/rbd/action/Snap.cc
src/tools/rbd/action/Trash.cc
src/tools/rbd_mirror/NamespaceReplayer.cc
src/tools/rbd_mirror/PoolReplayer.cc
src/tools/rbd_mirror/PoolWatcher.cc

index c5746f66eff8054864a15f225321db0483aed46e..f4ef8047605174696651404e5e7f90da516f09fe 100644 (file)
@@ -36,7 +36,6 @@
 #include "librbd/operation/ResizeRequest.h"
 
 #include "osdc/Striper.h"
-#include <boost/bind.hpp>
 #include <boost/algorithm/string/predicate.hpp>
 
 #define dout_subsys ceph_subsys_rbd
index 979f7a4b5a4bef128a75ada83cdbb0c1eb44999a..88c1322dfdb0f16d170152d746b1e8cd9c454c57 100644 (file)
@@ -16,7 +16,7 @@
 #include "librbd/io/AioCompletion.h"
 #include "include/encoding.h"
 #include "common/errno.h"
-#include <boost/bind.hpp>
+#include <boost/bind/bind.hpp>
 
 #define dout_subsys ceph_subsys_rbd
 #undef dout_prefix
@@ -33,6 +33,8 @@ using util::create_rados_callback;
 using ceph::encode;
 using ceph::decode;
 
+using namespace boost::placeholders;
+
 static const double    RETRY_DELAY_SECONDS = 1.0;
 
 template <typename I>
index 751a250123a5bea262ba8800b7e630731c2cecad..7342b4d2d64fd0b501d4c8e9751beea66e20f989 100644 (file)
@@ -38,7 +38,7 @@
 #include "librbd/operation/SnapshotLimitRequest.h"
 #include "librbd/operation/SparsifyRequest.h"
 #include <set>
-#include <boost/bind.hpp>
+#include <boost/bind/bind.hpp>
 #include <boost/scope_exit.hpp>
 
 #define dout_subsys ceph_subsys_rbd
@@ -47,6 +47,8 @@
 
 namespace librbd {
 
+using namespace boost::placeholders;
+
 namespace {
 
 template <typename I>
index 89d90c6599bc6cb0b014b9f0694fd8988f0c221a..fef79533b2171a83a698aabff677fda4bd721de4 100644 (file)
@@ -8,7 +8,7 @@
 #include "librbd/asio/ContextWQ.h"
 #include "include/encoding.h"
 #include "common/errno.h"
-#include <boost/bind.hpp>
+#include <boost/bind/bind.hpp>
 
 // re-include our assert to clobber the system one; fix dout:
 #include "include/ceph_assert.h"
@@ -17,6 +17,8 @@
 
 namespace librbd {
 
+using namespace boost::placeholders;
+
 using namespace watcher;
 
 using util::create_context_callback;
index d41573d693112c64dce48c081f1e9488de1363a4..58f0a2ce1a088274f555d0530078e4f42fdc47bf 100644 (file)
@@ -18,7 +18,6 @@
 #include "librbd/io/ObjectRequest.h"
 #include "librbd/io/ReadResult.h"
 
-#include <boost/bind.hpp>
 #include <boost/lambda/bind.hpp>
 #include <boost/lambda/construct.hpp>
 
index 51efbae21efb77d82ea2fd5142d48e65d91f19a6..bacc6234b18eb625abd0e1717b23c74412fd9eac 100644 (file)
@@ -20,7 +20,6 @@
 #include "librbd/io/ImageRequest.h"
 #include "librbd/io/ReadResult.h"
 
-#include <boost/bind.hpp>
 #include <boost/optional.hpp>
 
 #define dout_subsys ceph_subsys_rbd
index 0fcb7af034bd73be6710a6c4fbac0ed07e47f2c7..63c0b232bbd9491b9f429b5d8d442c7b6d0abe3a 100644 (file)
@@ -15,7 +15,6 @@
 #include "common/errno.h"
 #include "osdc/Striper.h"
 
-#include <boost/bind.hpp>
 #include <boost/lambda/bind.hpp>
 #include <boost/lambda/construct.hpp>
 #include <boost/scope_exit.hpp>
index 3f3fbbd53d5fd6ec9b434aa7afbb3cbfaa1af80a..365c3e3cd9bbcd5a1c8139cd9e696e619d0b5cc3 100644 (file)
 std::string PyModule::config_prefix = "mgr/";
 
 // Courtesy of http://stackoverflow.com/questions/1418015/how-to-get-python-exception-text
+#define BOOST_BIND_GLOBAL_PLACEHOLDERS
+// Boost apparently can't be bothered to fix its own usage of its own
+// deprecated features.
 #include <boost/python.hpp>
+#undef BOOST_BIND_GLOBAL_PLACEHOLDERS
 #include <boost/algorithm/string/predicate.hpp>
 #include "include/ceph_assert.h"  // boost clobbers this
 // decode a Python exception into a string
index 8537cfde480778a28d8228100cbb415e1c5ae8c9..5d71f46949ade816c86d7bc5513151c4ba5fee84 100644 (file)
@@ -21,7 +21,9 @@
 #include "mgr/Gil.h"
 
 
+#define BOOST_BIND_GLOBAL_PLACEHOLDERS
 #include <boost/python.hpp>
+#undef BOOST_BIND_GLOBAL_PLACEHOLDERS
 #include "include/ceph_assert.h"  // boost clobbers this
 
 // For ::config_prefix
index e4df483c1f67301080f005e4b3a2f68623651a93..00fb1cb32344dfe7520c176b6e1153f0ec2a6aac 100644 (file)
@@ -4,7 +4,7 @@
 #ifndef _INCLUDED_BOUNDED_BUFFER_HPP
 #define _INCLUDED_BOUNDED_BUFFER_HPP
 
-#include <boost/bind.hpp>
+#include <boost/bind/bind.hpp>
 #include <boost/circular_buffer.hpp>
 #include <boost/thread/condition.hpp>
 #include <boost/thread/mutex.hpp>
index 0958f2871edb9c3fe8149fadf93bb12d203112ae..57acbbdf1e3f3485efb854150ae811a03aa730cb 100644 (file)
@@ -10,7 +10,6 @@
 #include <string_view>
 
 #include <boost/algorithm/string/predicate.hpp>
-#include <boost/bind.hpp>
 #include <boost/optional.hpp>
 #include <boost/utility/in_place_factory.hpp>
 
index 90c4903b8d8b026efbc0e140a98d3916585e050a..96d863296618e1d5a06eaa532367bbc2f036b47d 100644 (file)
@@ -17,7 +17,9 @@
 #include <boost/algorithm/string.hpp>
 #include <boost/algorithm/string/replace.hpp>
 #include <boost/tokenizer.hpp>
+#define BOOST_BIND_GLOBAL_PLACEHOLDERS
 #include <s3select/include/s3select.h>
+#undef BOOST_BIND_GLOBAL_PLACEHOLDERS
 
 #include <liboath/oath.h>
 
index 9da9971fa802cab5e7e3420c5f18fb7c5d23aede..4c43090ca1a2f063edc3db6801d5856d480452c9 100644 (file)
@@ -8,7 +8,7 @@
 #include "common/Finisher.h"
 #include "test/librados_test_stub/TestCluster.h"
 #include "test/librados_test_stub/TestRadosClient.h"
-#include <boost/bind.hpp>
+#include <boost/bind/bind.hpp>
 #include <boost/function.hpp>
 #include "include/ceph_assert.h"
 
index 209133e9ec662eecb69307f51b610c0ce8bd6372..a3cdfdb5e3410ce19a7f9f4fdb65dee48461bf02 100644 (file)
@@ -20,7 +20,6 @@
 #include "gtest/gtest.h"
 #include <boost/assign/std/set.hpp>
 #include <boost/assign/std/map.hpp>
-#include <boost/bind.hpp>
 #include <boost/scope_exit.hpp>
 #include <boost/thread/thread.hpp>
 #include <iostream>
index 45dae6b88fd2cedd21a2406b8d3ba5ac33bfc6d6..bbacf5e208fa8b86a572742e4a7b4e4fd96ef891 100644 (file)
@@ -1,6 +1,7 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
 // vim: ts=8 sw=2 smarttab
 
+#include <boost/bind/bind.hpp>
 #include "CacheClient.h"
 #include "common/Cond.h"
 
index 3294e56048ab28373082b842cf3a6da92695828b..e1e9a65927d438f8bba17067c142f36c23d56652 100644 (file)
@@ -6,7 +6,6 @@
 
 #include <atomic>
 #include <boost/asio.hpp>
-#include <boost/bind.hpp>
 #include <boost/asio/error.hpp>
 #include <boost/algorithm/string.hpp>
 
index 7e68d7e875159807acf238275ca1bfd23ee005be..e1ec1c74b7cb598b93adea1264202188a5b209a5 100644 (file)
@@ -1,7 +1,7 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
 // vim: ts=8 sw=2 smarttab
 
-#include <boost/bind.hpp>
+#include <boost/bind/bind.hpp>
 #include "common/debug.h"
 #include "common/ceph_context.h"
 #include "CacheServer.h"
index 5bf730354ab3e6390667210611aedc41ee6efc31..6d8daf05be1f5b88b32463d7477fd43ceaa198bf 100644 (file)
@@ -1,6 +1,7 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
 // vim: ts=8 sw=2 smarttab
 
+#include <boost/bind/bind.hpp>
 #include "common/debug.h"
 #include "common/ceph_context.h"
 #include "CacheSession.h"
index d530b529c8c22008d5aa746a05833bb55d6406f9..3cc4d9ed8004ee09881c3426ef59ce0f9b2c5525 100644 (file)
@@ -4,7 +4,6 @@
 #ifndef CEPH_CACHE_SESSION_H
 #define CEPH_CACHE_SESSION_H
 
-#include <boost/bind.hpp>
 #include <boost/asio.hpp>
 #include <boost/asio/error.hpp>
 
index 0e8f0590383fd212af6067994af62b7cedbea2f0..12fb8cfde960e2287290f820691c6af32d0e1850 100644 (file)
@@ -11,7 +11,7 @@
 #include "common/TextTable.h"
 #include <algorithm>
 #include <iostream>
-#include <boost/bind.hpp>
+#include <boost/bind/bind.hpp>
 #include <boost/program_options.hpp>
 
 namespace rbd {
@@ -20,6 +20,7 @@ namespace disk_usage {
 
 namespace at = argument_types;
 namespace po = boost::program_options;
+using namespace boost::placeholders;
 
 static int disk_usage_callback(uint64_t offset, size_t len, int exists,
                                void *arg) {
index 67d9e4f8414202b4ce142d8343833f3d693068fd..b42695b31b3c4378e9b5a0b8c228ed71a418bdb0 100644 (file)
@@ -11,7 +11,7 @@
 #include "common/Formatter.h"
 #include "common/TextTable.h"
 #include <iostream>
-#include <boost/bind.hpp>
+#include <boost/bind/bind.hpp>
 #include <boost/program_options.hpp>
 #include "global/global_context.h"
 
@@ -22,6 +22,7 @@ namespace list {
 
 namespace at = argument_types;
 namespace po = boost::program_options;
+using namespace boost::placeholders;
 
 enum WorkerState {
   STATE_IDLE = 0,
index b2011ebae23f5636b0a67755b0354b68313b883f..e8a9cb1b8d1c0e7aebdec5e2122f8934c7f8b96a 100644 (file)
 #include "common/TextTable.h"
 #include <iostream>
 #include <boost/program_options.hpp>
-#include <boost/bind.hpp>
+#include <boost/bind/bind.hpp>
 
 namespace rbd {
 namespace action {
 namespace snap {
 
+using namespace boost::placeholders;
+
 static const std::string ALL_NAME("all");
 
 namespace at = argument_types;
index 1b7721a59bd3d3d148c00af975b64870cf3d6ad3..b1e0de132f174db46bd4bf8b0c27eee5f0eaa361 100644 (file)
 #include <iostream>
 #include <sstream>
 #include <boost/program_options.hpp>
-#include <boost/bind.hpp>
+#include <boost/bind/bind.hpp>
 
 namespace rbd {
 namespace action {
 namespace trash {
+using namespace boost::placeholders;
 
 namespace at = argument_types;
 namespace po = boost::program_options;
index 10382c914b6e33004f4858c95f39eee684548252..d86514967ed9ff49fb4c95dcec46ea19f576bf0c 100644 (file)
@@ -2,7 +2,6 @@
 // vim: ts=8 sw=2 smarttab
 
 #include "NamespaceReplayer.h"
-#include <boost/bind.hpp>
 #include "common/Formatter.h"
 #include "common/debug.h"
 #include "common/errno.h"
index 75067813aa59db992cd81d3309594e7210f0de66..42018d5d548a543b1a4850bd448ef2a474454735 100644 (file)
@@ -2,7 +2,6 @@
 // vim: ts=8 sw=2 smarttab
 
 #include "PoolReplayer.h"
-#include <boost/bind.hpp>
 #include "common/Cond.h"
 #include "common/Formatter.h"
 #include "common/admin_socket.h"
index 9fa8e88811d06b7eb7861e030fb4541f474b0f0b..c6d68ecd4e1c9c77b676178a82fd52994293d3c0 100644 (file)
@@ -16,7 +16,6 @@
 #include "librbd/asio/ContextWQ.h"
 #include "tools/rbd_mirror/Threads.h"
 #include "tools/rbd_mirror/pool_watcher/RefreshImagesRequest.h"
-#include <boost/bind.hpp>
 
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rbd_mirror