libqcdm,reset: fix warnings with -Wsign-compare

reset.c: In function ‘print_buf’:
  reset.c:47:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
     47 |     for (i = 0; i < len; i++) {
        |                   ^
  reset.c: In function ‘qcdm_wait_reply’:
  reset.c:168:20: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
    168 |     } while (total < sizeof (readbuf));
        |                    ^
This commit is contained in:
Aleksander Morgado
2020-01-30 11:59:14 +01:00
parent 47a380a2ae
commit 305d927ee0
+2 -2
View File
@@ -37,7 +37,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;
@@ -121,7 +121,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);