mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 18:41:29 +00:00
Core: Integrate warning suppression macro helpers
This commit is contained in:
parent
1f56d96cf2
commit
207a2b6472
25 changed files with 119 additions and 180 deletions
|
|
@ -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())) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue