summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2013-09-30 15:58:24 +0200
committerGravatar Nikias Bassen2013-09-30 15:58:24 +0200
commitb483eda23f1fb71935da4fa1bd91ad422c4e5e80 (patch)
tree616696af6b5d3fe34a60f3ed1b9367ea33cd3a45
parent4847a1161c712e6e56287b367296cc837bcd6b0a (diff)
downloadusbmuxd-b483eda23f1fb71935da4fa1bd91ad422c4e5e80.tar.gz
usbmuxd-b483eda23f1fb71935da4fa1bd91ad422c4e5e80.tar.bz2
device: suppress two compiler warnings with appropriate casts
-rw-r--r--src/device.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/device.c b/src/device.c
index 99e0153..b6cc32a 100644
--- a/src/device.c
+++ b/src/device.c
@@ -386,7 +386,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;
@@ -721,7 +721,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) {
@@ -731,7 +731,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;