diff options
author | David Robillard <d@drobilla.net> | 2019-10-27 17:26:43 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-10-27 22:40:28 +0100 |
commit | f0c5278f57b1ba231568f8b8fd6ff355b9622a09 (patch) | |
tree | 33cf03f882ed76172144051586f42ff757f02c4a /src/uri.c | |
parent | bbe5313c31386366175222cde3055b63848ebb4c (diff) | |
download | serd-f0c5278f57b1ba231568f8b8fd6ff355b9622a09.tar.gz serd-f0c5278f57b1ba231568f8b8fd6ff355b9622a09.tar.bz2 serd-f0c5278f57b1ba231568f8b8fd6ff355b9622a09.zip |
Fix integer conversion warnings
Diffstat (limited to 'src/uri.c')
-rw-r--r-- | src/uri.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -58,8 +58,8 @@ serd_file_uri_parse(const uint8_t* uri, uint8_t** hostname) return NULL; } if (hostname) { - *hostname = (uint8_t*)calloc(path - auth + 1, 1); - memcpy(*hostname, auth, path - auth); + *hostname = (uint8_t*)calloc((size_t)(path - auth + 1), 1); + memcpy(*hostname, auth, (size_t)(path - auth)); } } } @@ -128,7 +128,7 @@ serd_uri_parse(const uint8_t* utf8, SerdURI* out) goto path; // Relative URI (starts with path by definition) case ':': out->scheme.buf = utf8; - out->scheme.len = (ptr++) - utf8; + out->scheme.len = (size_t)((ptr++) - utf8); goto maybe_authority; // URI with scheme case '+': case '-': case '.': continue; @@ -297,12 +297,12 @@ merge(SerdChunk* base, SerdChunk* path) } while (up > 0 && (--base_last > base->buf)); // Set path prefix - base->len = base_last - base->buf + 1; + base->len = (size_t)(base_last - base->buf + 1); } // Set path suffix path->buf = begin; - path->len = end - begin; + path->len = (size_t)(end - begin); } /// See http://tools.ietf.org/html/rfc3986#section-5.2.2 |