test-qcdm-serial-port: fix warnings with -Wsign-compare

test-qcdm-serial-port.c: In function ‘print_buf’:
  test-qcdm-serial-port.c:79:19: error: comparison of integer expressions of different signedness: ‘int’ and ‘gsize’ {aka ‘long unsigned int’} [-Werror=sign-compare]
     79 |     for (i = 0; i < len; i++) {
        |                   ^
  test-qcdm-serial-port.c: In function ‘server_wait_request’:
  test-qcdm-serial-port.c:163:20: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Werror=sign-compare]
    163 |     } while (total < sizeof (readbuf));
        |                    ^
This commit is contained in:
Aleksander Morgado
2020-01-31 14:52:49 +01:00
parent 9ad6e1f633
commit 7125a86e04
+2 -2
View File
@@ -72,7 +72,7 @@ wait_for_child (TestData *d, guint32 timeout)
static void
print_buf (const char *detail, const char *buf, gsize len)
{
int i = 0;
guint i = 0;
gboolean newline = FALSE;
g_print ("%s (%zu) ", detail, len);
@@ -116,7 +116,7 @@ server_wait_request (int fd, char *buf, gsize len)
struct timeval timeout = { 1, 0 };
char readbuf[1024];
ssize_t bytes_read;
int total = 0, retries = 0;
guint total = 0, retries = 0;
gsize decap_len = 0;
FD_ZERO (&in);