mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 23:31:53 -05:00
Core: Integrate warning suppression macro helpers
This commit is contained in:
@@ -135,10 +135,7 @@ NetSocketUnix::~NetSocketUnix() {
|
||||
|
||||
// Silence a warning reported in GH-27594.
|
||||
// EAGAIN and EWOULDBLOCK have the same value on most platforms, but it's not guaranteed.
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wlogical-op"
|
||||
#endif
|
||||
GODOT_GCC_WARNING_PUSH_AND_IGNORE("-Wlogical-op")
|
||||
|
||||
NetSocketUnix::NetError NetSocketUnix::_get_socket_error() const {
|
||||
if (errno == EISCONN) {
|
||||
@@ -163,9 +160,7 @@ NetSocketUnix::NetError NetSocketUnix::_get_socket_error() const {
|
||||
return ERR_NET_OTHER;
|
||||
}
|
||||
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
GODOT_GCC_WARNING_POP
|
||||
|
||||
bool NetSocketUnix::_can_use_ip(const IPAddress &p_ip, const bool p_for_bind) const {
|
||||
if (p_for_bind && !(p_ip.is_valid() || p_ip.is_wildcard())) {
|
||||
|
||||
Reference in New Issue
Block a user