Ticket #12831: 0019-cddb_server.cpp-fix-clang-warnings.patch

File 0019-cddb_server.cpp-fix-clang-warnings.patch, 976 bytes (added by mt, 8 years ago)
  • src/bin/cddb_lookup/cddb_server.cpp

    From 44f8320a59f485c68a0bc156da08d57bef27e590 Mon Sep 17 00:00:00 2001
    From: Murai Takashi <tmurai01@gmail.com>
    Date: Sun, 26 Jun 2016 16:32:18 +0900
    Subject: [PATCH 19/21] cddb_server.cpp: fix clang warnings
    
    Since 'port' is int32, use INT32_MAX and INT32_MIN
    instead of LONG_MAX and LONG_MIN.
    ---
     src/bin/cddb_lookup/cddb_server.cpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/bin/cddb_lookup/cddb_server.cpp b/src/bin/cddb_lookup/cddb_server.cpp
    index df69d46..d2b16ef 100644
    a b CDDBServer::_ParseAddress(const BString& cddbServer)  
    312312            char* firstInvalid;
    313313            errno = 0;
    314314            port = strtol(portString.String(), &firstInvalid, 10);
    315             if ((errno == ERANGE && (port == LONG_MAX || port == LONG_MIN))
     315            if ((errno == ERANGE && (port == INT32_MAX || port == INT32_MIN))
    316316                || (errno != 0 && port == 0)) {
    317317                return B_ERROR;
    318318            }