Core: Integrate warning suppression macro helpers

This commit is contained in:
Thaddeus Crews 2025-03-31 10:56:33 -05:00
parent 1f56d96cf2
commit 207a2b6472
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
25 changed files with 119 additions and 180 deletions

View file

@ -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())) {