From: Florian Forster Date: Fri, 18 Dec 2009 10:52:22 +0000 (+0100) Subject: Fix a couple of compiler warnings. X-Git-Tag: librouteros-1.0.1~5 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=77cff5db667e7c1d62b697161f0f7176a2fab390;p=routeros-api.git Fix a couple of compiler warnings. Cast when comparing signed and unsigned size_t. --- diff --git a/src/main.c b/src/main.c index 169e39c..d492b48 100644 --- a/src/main.c +++ b/src/main.c @@ -112,7 +112,7 @@ static int read_exact (int fd, void *buffer, size_t buffer_size) /* {{{ */ return (status); } - assert (status <= want_bytes); + assert (((size_t) status) <= want_bytes); have_bytes += status; buffer_ptr += status; } @@ -389,7 +389,7 @@ static int send_command (ros_connection_t *c, /* {{{ */ else return (errno); } - assert (bytes_written <= buffer_size); + assert (((size_t) bytes_written) <= buffer_size); buffer_ptr += bytes_written; buffer_size -= bytes_written;