msg,common: do not include assert.h everywhere to clobber <assert.h>

* reverts c93daaf92b
* add "#include "include/assert.h" to where <cassert> or <assert.h> are
  included, or avoid including them if possible.

Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2017-06-08 11:21:11 +08:00
parent 161ea38fd5
commit 28c8373734
23 changed files with 8 additions and 59 deletions

View File

@ -3,11 +3,6 @@
#include "Finisher.h"
#include "common/debug.h"
// re-include our assert to clobber the system one; fix dout:
#include "include/assert.h"
#define dout_subsys ceph_subsys_finisher
#undef dout_prefix
#define dout_prefix *_dout << "finisher(" << this << ") "

View File

@ -3,10 +3,11 @@
#ifndef CEPH_COMMON_CMDPARSE_H
#define CEPH_COMMON_CMDPARSE_H
#include <boost/variant.hpp>
#include <vector>
#include <stdexcept>
#include <ostream>
#include <boost/variant.hpp>
#include "include/assert.h" // boost clobbers this
#include "common/Formatter.h"
#include "common/BackTrace.h"

View File

@ -18,10 +18,10 @@
#include <array>
#include <atomic>
#include <memory>
#include <cassert>
#include "common/Formatter.h"
#include "include/int_types.h"
#include "include/assert.h"
class PerfHistogramCommon {
public:

View File

@ -16,10 +16,10 @@
#define CEPH_COMPRESSOR_H
#include <boost/optional.hpp>
#include <memory>
#include <string>
#include <boost/optional.hpp>
#include "include/assert.h" // boost clobbers this
#include "include/buffer.h"
#include "include/int_types.h"

View File

@ -20,13 +20,13 @@ extern "C" {
#include "builder.h"
}
#include "include/assert.h"
#include "include/err.h"
#include "include/encoding.h"
#include "common/Mutex.h"
#include "include/assert.h"
#define BUG_ON(x) assert(!(x))
namespace ceph {

View File

@ -37,6 +37,7 @@
#include <boost/intrusive/set.hpp>
#include <boost/optional.hpp>
#include "include/assert.h" // boost clobbers this
#include "include/intarith.h"
#include "include/int_types.h"
#include "include/memory.h"

View File

@ -13,7 +13,6 @@
#include <vector>
#include <map>
#include <string>
#include <cassert>
#include <sstream>
#include <stdexcept>
#include <boost/config.hpp>

View File

@ -19,8 +19,6 @@
#include "PurgeQueue.h"
// reinclude our assert to clobber the system one
#include "include/assert.h"
#define dout_context cct
#define dout_subsys ceph_subsys_mds

View File

@ -20,9 +20,6 @@
#include "RecoveryQueue.h"
// reinclude our assert to clobber the system one
#include "include/assert.h"
#define dout_context g_ceph_context
#define dout_subsys ceph_subsys_mds
#undef dout_prefix

View File

@ -17,9 +17,6 @@
#include "mgr/ClusterState.h"
// reinclude our assert to clobber the system one
#include "include/assert.h"
#define dout_context g_ceph_context
#define dout_subsys ceph_subsys_mgr
#undef dout_prefix

View File

@ -25,9 +25,6 @@
#include "messages/MPGStats.h"
#include "messages/MOSDScrub.h"
// reinclude our assert to clobber the system one
#include "include/assert.h"
#define dout_context g_ceph_context
#define dout_subsys ceph_subsys_mgr
#undef dout_prefix

View File

@ -13,9 +13,6 @@
#include "DaemonState.h"
// reinclude our assert to clobber the system one
#include "include/assert.h"
#define dout_context g_ceph_context
#define dout_subsys ceph_subsys_mgr
#undef dout_prefix

View File

@ -33,9 +33,6 @@
#include "Mgr.h"
// reinclude our assert to clobber the system one
#include "include/assert.h"
#define dout_context g_ceph_context
#define dout_subsys ceph_subsys_mgr
#undef dout_prefix

View File

@ -25,9 +25,6 @@
#include "messages/MCommandReply.h"
#include "messages/MPGStats.h"
// reinclude our assert to clobber the system one
#include "include/assert.h"
#define dout_subsys ceph_subsys_mgrc
#undef dout_prefix
#define dout_prefix *_dout << "mgrc " << __func__ << " "

View File

@ -39,9 +39,6 @@
#include "auth/AuthMethodList.h"
#include "auth/RotatingKeyRing.h"
// reinclude our assert to clobber the system one
#include "include/assert.h"
#define dout_subsys ceph_subsys_monc
#undef dout_prefix
#define dout_prefix *_dout << "monclient" << (_hunting() ? "(hunting)":"") << ": "

View File

@ -191,9 +191,6 @@ using namespace std;
#define DEBUGLVL 10 // debug level of output
// reinclude our assert to clobber the system one
#include "include/assert.h"
#define dout_subsys ceph_subsys_ms
void Message::encode(uint64_t features, int crcflags)

View File

@ -14,9 +14,6 @@
#include "msg/xio/XioMessenger.h"
#endif
// reinclude our assert to clobber the system one
#include "include/assert.h"
Messenger *Messenger::create_client_messenger(CephContext *cct, string lname)
{
std::string public_msgr_type = cct->_conf->ms_public_type.empty() ? cct->_conf->get_val<std::string>("ms_type") : cct->_conf->ms_public_type;

View File

@ -32,9 +32,6 @@
#include "common/dout.h"
#include "common/simple_spin.h"
// re-include our assert to clobber the system one; fix dout:
#include "include/assert.h"
#define dout_subsys ceph_subsys_ms
#undef dout_prefix
#define dout_prefix *_dout << "PosixStack "

View File

@ -19,9 +19,6 @@
#include "common/debug.h"
#include "RDMAStack.h"
// reinclude our assert to clobber the system one
#include "include/assert.h"
#define dout_subsys ceph_subsys_ms
#undef dout_prefix
#define dout_prefix *_dout << "Infiniband "

View File

@ -26,12 +26,9 @@
#include "include/page.h"
#include "common/debug.h"
#include "common/errno.h"
#include "common/Mutex.h"
#include "msg/msg_types.h"
#include "msg/async/net_handler.h"
#include "common/Mutex.h"
// re-include our assert to clobber the system one; fix dout:
#include "include/assert.h"
#define HUGE_PAGE_SIZE (2 * 1024 * 1024)
#define ALIGN_TO_PAGE_SIZE(x) \

View File

@ -16,9 +16,6 @@
#include "RDMAStack.h"
// reinclude our assert to clobber the system one
#include "include/assert.h"
#define dout_subsys ceph_subsys_ms
#undef dout_prefix
#define dout_prefix *_dout << " RDMAConnectedSocketImpl "

View File

@ -17,9 +17,6 @@
#include "msg/async/net_handler.h"
#include "RDMAStack.h"
// reinclude our assert to clobber the system one
#include "include/assert.h"
#define dout_subsys ceph_subsys_ms
#undef dout_prefix
#define dout_prefix *_dout << " RDMAServerSocketImpl "

View File

@ -23,9 +23,6 @@
#include "common/Tub.h"
#include "RDMAStack.h"
// reinclude our assert to clobber the system one
#include "include/assert.h"
#define dout_subsys ceph_subsys_ms
#undef dout_prefix
#define dout_prefix *_dout << "RDMAStack "