Skip to content

Commit

Permalink
device: suppress two compiler warnings with appropriate casts
Browse files Browse the repository at this point in the history
  • Loading branch information
nikias authored and olunx committed Apr 4, 2014
1 parent c9ff0cb commit 11735d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ void device_client_process(int device_id, struct mux_client *client, short event
return;
}
conn->tx_ack += size;
if(size == conn->ib_size) {
if(size == (int)conn->ib_size) {
conn->ib_size = 0;
} else {
conn->ib_size -= size;
Expand Down Expand Up @@ -773,7 +773,7 @@ int device_get_list(int include_hidden, struct device_info *p)

int device_get_timeout(void)
{
uint64_t oldest = (uint64_t)-1;
uint64_t oldest = (uint64_t)-1LL;
FOREACH(struct mux_device *dev, &device_list) {
if(dev->state == MUXDEV_ACTIVE) {
FOREACH(struct mux_connection *conn, &dev->connections) {
Expand All @@ -783,7 +783,7 @@ int device_get_timeout(void)
}
} ENDFOREACH
uint64_t ct = mstime64();
if(oldest == -1)
if((int64_t)oldest == -1LL)
return 100000; //meh
if((ct - oldest) > ACK_TIMEOUT)
return 0;
Expand Down

0 comments on commit 11735d2

Please sign in to comment.