Skip to content

Commit

Permalink
fix gcc13
Browse files Browse the repository at this point in the history
  • Loading branch information
lihuiba committed Mar 28, 2024
1 parent a34a0fe commit 22bb731
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions common/iovector.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ limitations under the License.
#include <photon/common/callback.h>
#include <photon/common/io-alloc.h>

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunknown-warning-option"
#pragma GCC diagnostic ignored "-Wzero-length-bounds"

inline bool operator == (const iovec& a, const iovec& b)
{
return a.iov_base == b.iov_base && a.iov_len == b.iov_len;
Expand Down Expand Up @@ -1074,3 +1078,4 @@ class SmartCloneIOV

#undef IF_ASSERT_RETURN

#pragma GCC diagnostic pop
2 changes: 2 additions & 0 deletions net/datagram_socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ class IDatagramSocket : public IMessage,
ssize_t recv(B* buf, S count, int flags = 0) {
return cast()->recv(buf, count, nullptr, nullptr, flags);
}
using IMessage::recv;
using IMessage::send;
};

class UDPSocket : public IDatagramSocket {
Expand Down
4 changes: 4 additions & 0 deletions rpc/rpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,12 @@ namespace rpc {
if (unlikely(!m_running))
return -1;

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunknown-warning-option"
#pragma GCC diagnostic ignored "-Wdangling-pointer"
ThreadLink node;
m_list.push_back(&node);
#pragma GCC diagnostic pop
DEFER(m_list.erase(&node));
// stream serve refcount
int stream_serv_count = 0;
Expand Down

0 comments on commit 22bb731

Please sign in to comment.