aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2020-01-14 10:17:48 +0100
committerAleksander Morgado <aleksander@aleksander.es>2020-01-31 14:52:49 +0100
commit7125a86e0488320449767fcacbad5c7ca2c9c719 (patch)
tree45b1d394e74acdb45292d8a38409c5cbed6ddc04 /src/tests
parent9ad6e1f6334773217710105162fd507b704f8530 (diff)
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)); | ^
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/test-qcdm-serial-port.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tests/test-qcdm-serial-port.c b/src/tests/test-qcdm-serial-port.c
index e6899051..c5233f9c 100644
--- a/src/tests/test-qcdm-serial-port.c
+++ b/src/tests/test-qcdm-serial-port.c
@@ -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);