diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2019-11-20 15:57:20 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2020-01-30 11:59:14 +0100 |
commit | 17a00ce1fcad6e0ce28d2312620ff27af12e618d (patch) | |
tree | 4469336d656820f49c12089f2911152734ff44a2 /libqcdm | |
parent | 4fa669b894cd1ff5619e834a30ec3975d11d1505 (diff) | |
download | ModemManager-17a00ce1fcad6e0ce28d2312620ff27af12e618d.tar.gz |
libqcdm,modepref: fix warnings with -Wsign-compare
modepref.c: In function ‘print_buf’:
modepref.c:46:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
46 | for (i = 0; i < len; i++) {
| ^
modepref.c: In function ‘qcdm_wait_reply’:
modepref.c:167:17: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
167 | } while (total < sizeof (readbuf));
| ^
Diffstat (limited to 'libqcdm')
-rw-r--r-- | libqcdm/tests/modepref.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libqcdm/tests/modepref.c b/libqcdm/tests/modepref.c index cf6e73b4c..e5310d9c5 100644 --- a/libqcdm/tests/modepref.c +++ b/libqcdm/tests/modepref.c @@ -36,7 +36,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; @@ -120,7 +120,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); |