aboutsummaryrefslogtreecommitdiff
path: root/libqcdm
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2019-11-20 16:00:01 +0100
committerAleksander Morgado <aleksander@aleksander.es>2020-01-30 11:59:14 +0100
commit07fe3bed65ebe1a1f59f3bb8d1e06de572120e3c (patch)
treef519236f702a8cb82f398cf175958ef9096634df /libqcdm
parentc135c66684d6fba899f26ddc1085494ee299fd4f (diff)
libqcdm,ipv6pref: fix warnings with -Wsign-compare
ipv6pref.c: In function ‘print_buf’: ipv6pref.c:46:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 46 | for (i = 0; i < len; i++) { | ^ ipv6pref.c: In function ‘qcdm_wait_reply’: ipv6pref.c:167:17: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare] 167 | } while (total < sizeof (readbuf)); | ^
Diffstat (limited to 'libqcdm')
-rw-r--r--libqcdm/tests/ipv6pref.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libqcdm/tests/ipv6pref.c b/libqcdm/tests/ipv6pref.c
index ffb7a7e9..aa9c9702 100644
--- a/libqcdm/tests/ipv6pref.c
+++ b/libqcdm/tests/ipv6pref.c
@@ -36,7 +36,7 @@ static int debug = 0;
static void
print_buf (const char *detail, const char *buf, size_t len)
{
- int i = 0, z;
+ unsigned int i, z;
qcdmbool newline = FALSE;
char tmp[500];
uint32_t flen;
@@ -120,7 +120,7 @@ qcdm_wait_reply (int fd, char *buf, size_t len)
struct timeval timeout = { 1, 0 };
char readbuf[1024];
ssize_t bytes_read;
- int total = 0, retries = 0;
+ unsigned int total = 0, retries = 0;
size_t decap_len = 0;
FD_ZERO (&in);