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));
        |                    ^
This commit is contained in:
Aleksander Morgado
2019-11-20 15:54:44 +01:00
parent 06567283b1
commit 45c0015c08

View File

@@ -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);