#12831: [Patch] cddb_server.cpp: fix clang warnings
---------------------------------------------+-----------------------------
Reporter: mt | Owner: nobody
Type: bug | Status: new
Priority: normal | Milestone: Unscheduled
Component: Applications/Command Line Tools | Version:
Keywords: cddb_lookup | R1/Development
Blocking: | Blocked By:
Platform: All | Has a Patch: 0
---------------------------------------------+-----------------------------
Since 'port' is int32, use INT32_MAX and INT32_MIN instead of LONG_MAX and
LONG_MIN.
{{{
/home/haiku/haiku/haiku/src/bin/cddb_lookup/cddb_server.cpp:315:34:
warning: comparison of constant 9223372036854775807 with expression of
type 'int32' (aka 'int') is always false [-Wtautological-constant-out-of-
range-compare]
if ((errno == ERANGE && (port == LONG_MAX || port
== LONG_MIN))
~~~~ ^ ~~~~~~~~
/home/haiku/haiku/haiku/src/bin/cddb_lookup/cddb_server.cpp:315:54:
warning: comparison of constant -9223372036854775808 with expression of
type 'int32' (aka 'int') is always false [-Wtautological-constant-out-of-
range-compare]
if ((errno == ERANGE && (port == LONG_MAX || port
== LONG_MIN))
~~~~
^ ~~~~~~~~
}}}
--
Ticket URL: <https://dev.haiku-os.org/ticket/12831>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.