summaryrefslogtreecommitdiff
path: root/libqcdm
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2019-11-20 15:54:44 +0100
committerAleksander Morgado <aleksander@aleksander.es>2020-01-30 11:59:14 +0100
commit45c0015c0883bc8a65854d246070d5ec13bbcae8 (patch)
treedd1bc1537aef82c4ee792b9926e0d1100ded0b70 /libqcdm
parent06567283b1687f0628ee5464fe04c4550d4788ad (diff)
downloadModemManager-45c0015c0883bc8a65854d246070d5ec13bbcae8.tar.gz
test-qcdm-com: fix warnings with -Wsign-compare
test-qcdm-com.c: In function ‘print_buf’: test-qcdm-com.c:273:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘gsize’ {aka ‘long unsigned int’} [-Wsign-compare] 273 | for (i = 0; i < len; i++) { | ^ test-qcdm-com.c: In function ‘wait_reply’: test-qcdm-com.c:367:20: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare] 367 | } while (total < sizeof (readbuf)); | ^
Diffstat (limited to 'libqcdm')
-rw-r--r--libqcdm/tests/test-qcdm-com.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libqcdm/tests/test-qcdm-com.c b/libqcdm/tests/test-qcdm-com.c
index 0689c07f2..d765b1d7f 100644
--- a/libqcdm/tests/test-qcdm-com.c
+++ b/libqcdm/tests/test-qcdm-com.c
@@ -266,7 +266,7 @@ test_com_teardown (gpointer user_data)
static void
print_buf (const char *detail, const char *buf, gsize len)
{
- int i = 0;
+ unsigned int i = 0;
gboolean newline = FALSE;
g_print ("%s (%zu) ", detail, len);
@@ -320,7 +320,7 @@ wait_reply (TestComData *d, char *buf, gsize len)
struct timeval timeout = { 1, 0 };
char readbuf[1024];
ssize_t bytes_read;
- int total = 0, retries = 0;
+ unsigned int total = 0, retries = 0;
gsize decap_len = 0;
FD_ZERO (&in);