diff options
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/ipc_channel_win.cc | 5 | ||||
-rw-r--r-- | ipc/ipc_send_fds_test.cc | 6 | ||||
-rw-r--r-- | ipc/unix_domain_socket_util.cc | 4 |
3 files changed, 8 insertions, 7 deletions
diff --git a/ipc/ipc_channel_win.cc b/ipc/ipc_channel_win.cc index 2ad638b..384c892 100644 --- a/ipc/ipc_channel_win.cc +++ b/ipc/ipc_channel_win.cc @@ -29,8 +29,9 @@ ChannelWin::State::State(ChannelWin* channel) : is_pending(false) { } ChannelWin::State::~State() { - COMPILE_ASSERT(!offsetof(ChannelWin::State, context), - starts_with_io_context); + static_assert(offsetof(ChannelWin::State, context) == 0, + "ChannelWin::State should have context as its first data" + "member."); } ChannelWin::ChannelWin(const IPC::ChannelHandle &channel_handle, diff --git a/ipc/ipc_send_fds_test.cc b/ipc/ipc_send_fds_test.cc index de2ae99..2e05e03 100644 --- a/ipc/ipc_send_fds_test.cc +++ b/ipc/ipc_send_fds_test.cc @@ -38,9 +38,9 @@ const unsigned kNumMessages = 20; const char* kDevZeroPath = "/dev/zero"; #if defined(OS_POSIX) -COMPILE_ASSERT(kNumFDsToSend == - IPC::MessageAttachmentSet::kMaxDescriptorsPerMessage, - num_fds_to_send_must_be_the_same_as_the_max_desc_per_message); +static_assert(kNumFDsToSend == + IPC::MessageAttachmentSet::kMaxDescriptorsPerMessage, + "The number of FDs to send must be kMaxDescriptorsPerMessage."); #endif class MyChannelDescriptorListenerBase : public IPC::Listener { diff --git a/ipc/unix_domain_socket_util.cc b/ipc/unix_domain_socket_util.cc index d1ddd83..7405344 100644 --- a/ipc/unix_domain_socket_util.cc +++ b/ipc/unix_domain_socket_util.cc @@ -20,8 +20,8 @@ namespace IPC { // Verify that kMaxSocketNameLength is a decent size. -COMPILE_ASSERT(sizeof(((sockaddr_un*)0)->sun_path) >= kMaxSocketNameLength, - BAD_SUN_PATH_LENGTH); +static_assert(sizeof(((sockaddr_un*)0)->sun_path) >= kMaxSocketNameLength, + "sun_path is too long."); namespace { |