Overview
| Comment: | Make GCC happy with -Wsign-compare |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
e840997cc87951e6de3173bfceb9e9da |
| User & Date: | js on 2016-05-06 20:54:33 |
| Other Links: | manifest | tags |
Context
|
2016-05-07
| ||
| 15:28 | PLATFORMS.md: Remove limitations for bare bone ARM (check-in: ebf1f2c0ab user: js tags: trunk) | |
|
2016-05-06
| ||
| 20:54 | Make GCC happy with -Wsign-compare (check-in: e840997cc8 user: js tags: trunk) | |
| 20:39 | Enable -Wsign-compare (check-in: 2a2e17d8d0 user: js tags: trunk) | |
Changes
Modified src/OFInflateStream.m from [8c624becdc] to [c6c9920c31].
| ︙ | ︙ | |||
404 405 406 407 408 409 410 | goto start; #undef CTX case UNCOMPRESSED_BLOCK: #define CTX _context.uncompressed if OF_UNLIKELY (length == 0) return bytesWritten; | | | 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 |
goto start;
#undef CTX
case UNCOMPRESSED_BLOCK:
#define CTX _context.uncompressed
if OF_UNLIKELY (length == 0)
return bytesWritten;
tmp = (length < (size_t)CTX.length - CTX.position
? (uint16_t)length : CTX.length - CTX.position);
tmp = (uint16_t)[_stream readIntoBuffer: buffer + bytesWritten
length: tmp];
if OF_UNLIKELY (_slidingWindow == NULL) {
_slidingWindow =
|
| ︙ | ︙ |
Modified src/OFTCPSocket.m from [f48a1756ef] to [373ad5cf82].
| ︙ | ︙ | |||
556 557 558 559 560 561 562 | # if defined(HAVE_FCNTL) && defined(FD_CLOEXEC) if ((flags = fcntl(client->_socket, F_GETFD, 0)) != -1) fcntl(client->_socket, F_SETFD, flags | FD_CLOEXEC); # endif #endif | | > | 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 |
# if defined(HAVE_FCNTL) && defined(FD_CLOEXEC)
if ((flags = fcntl(client->_socket, F_GETFD, 0)) != -1)
fcntl(client->_socket, F_SETFD, flags | FD_CLOEXEC);
# endif
#endif
assert(client->_addressLength <=
(socklen_t)sizeof(struct sockaddr_storage));
if (client->_addressLength != sizeof(struct sockaddr_storage)) {
@try {
client->_address = [client
resizeMemory: client->_address
size: client->_addressLength];
} @catch (OFOutOfMemoryException *e) {
|
| ︙ | ︙ |
Modified src/OFUDPSocket.m from [ad50b942db] to [bc2dead81f].
| ︙ | ︙ | |||
182 183 184 185 186 187 188 |
if (address1->address.ss_family != address2->address.ss_family)
return false;
switch (address1->address.ss_family) {
case AF_INET:
#if !defined(OF_WII) && !defined(OF_NINTENDO_3DS)
| | | | 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
if (address1->address.ss_family != address2->address.ss_family)
return false;
switch (address1->address.ss_family) {
case AF_INET:
#if !defined(OF_WII) && !defined(OF_NINTENDO_3DS)
if (address1->length < (socklen_t)sizeof(struct sockaddr_in) ||
address2->length < (socklen_t)sizeof(struct sockaddr_in))
@throw [OFInvalidArgumentException exception];
#else
if (address1->length < 8 || address2->length < 8)
@throw [OFInvalidArgumentException exception];
#endif
sin_1 = (struct sockaddr_in*)&address1->address;
|
| ︙ | ︙ | |||
239 240 241 242 243 244 245 |
#endif
hash += address->address.ss_family;
switch (address->address.ss_family) {
case AF_INET:
#if !defined(OF_WII) && !defined(OF_NINTENDO_3DS)
| | | 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
#endif
hash += address->address.ss_family;
switch (address->address.ss_family) {
case AF_INET:
#if !defined(OF_WII) && !defined(OF_NINTENDO_3DS)
if (address->length < (socklen_t)sizeof(struct sockaddr_in))
@throw [OFInvalidArgumentException exception];
#else
if (address->length < 8)
@throw [OFInvalidArgumentException exception];
#endif
sin = (struct sockaddr_in*)&address->address;
|
| ︙ | ︙ | |||
302 303 304 305 306 307 308 |
+ (void)resolveAddressForHost: (OFString*)host
port: (uint16_t)port
address: (of_udp_socket_address_t*)address
{
of_resolver_result_t **results =
of_resolve_host(host, port, SOCK_DGRAM);
| | > | 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 |
+ (void)resolveAddressForHost: (OFString*)host
port: (uint16_t)port
address: (of_udp_socket_address_t*)address
{
of_resolver_result_t **results =
of_resolve_host(host, port, SOCK_DGRAM);
assert(results[0]->addressLength <=
(socklen_t)sizeof(address->address));
memcpy(&address->address, results[0]->address,
results[0]->addressLength);
address->length = results[0]->addressLength;
of_resolver_free(results);
}
|
| ︙ | ︙ |