Opened 8 years ago

Closed 8 years ago

#12831 closed bug (fixed)

[Patch] cddb_server.cpp: fix clang warnings

Reported by: mt Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Applications/Command Line Tools Version: R1/Development
Keywords: cddb_lookup Cc:
Blocked By: Blocking:
Platform: All

Description

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))
                                                                     ~~~~ ^  ~~~~~~~~

Attachments (1)

0019-cddb_server.cpp-fix-clang-warnings.patch (976 bytes ) - added by mt 8 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 by mt, 8 years ago

patch: 01

comment:2 by Barrett, 8 years ago

Resolution: fixed
Status: newclosed

Applied in hrev50375.

Note: See TracTickets for help on using tickets.