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:
@@ -266,7 +266,7 @@ test_com_teardown (gpointer user_data)
|
|||||||
static void
|
static void
|
||||||
print_buf (const char *detail, const char *buf, gsize len)
|
print_buf (const char *detail, const char *buf, gsize len)
|
||||||
{
|
{
|
||||||
int i = 0;
|
unsigned int i = 0;
|
||||||
gboolean newline = FALSE;
|
gboolean newline = FALSE;
|
||||||
|
|
||||||
g_print ("%s (%zu) ", detail, len);
|
g_print ("%s (%zu) ", detail, len);
|
||||||
@@ -320,7 +320,7 @@ wait_reply (TestComData *d, char *buf, gsize len)
|
|||||||
struct timeval timeout = { 1, 0 };
|
struct timeval timeout = { 1, 0 };
|
||||||
char readbuf[1024];
|
char readbuf[1024];
|
||||||
ssize_t bytes_read;
|
ssize_t bytes_read;
|
||||||
int total = 0, retries = 0;
|
unsigned int total = 0, retries = 0;
|
||||||
gsize decap_len = 0;
|
gsize decap_len = 0;
|
||||||
|
|
||||||
FD_ZERO (&in);
|
FD_ZERO (&in);
|
||||||
|
Reference in New Issue
Block a user