aboutsummaryrefslogtreecommitdiffstats
path: root/src/env.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-10-27 17:26:43 +0100
committerDavid Robillard <d@drobilla.net>2019-10-27 22:40:28 +0100
commitf0c5278f57b1ba231568f8b8fd6ff355b9622a09 (patch)
tree33cf03f882ed76172144051586f42ff757f02c4a /src/env.c
parentbbe5313c31386366175222cde3055b63848ebb4c (diff)
downloadserd-f0c5278f57b1ba231568f8b8fd6ff355b9622a09.tar.gz
serd-f0c5278f57b1ba231568f8b8fd6ff355b9622a09.tar.bz2
serd-f0c5278f57b1ba231568f8b8fd6ff355b9622a09.zip
Fix integer conversion warnings
Diffstat (limited to 'src/env.c')
-rw-r--r--src/env.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/env.c b/src/env.c
index b26c6b20..55284b8c 100644
--- a/src/env.c
+++ b/src/env.c
@@ -188,13 +188,13 @@ serd_env_expand(const SerdEnv* env,
return SERD_ERR_BAD_ARG;
}
- const size_t name_len = colon - curie->buf;
+ const size_t name_len = (size_t)(colon - curie->buf);
const SerdPrefix* const prefix = serd_env_find(env, curie->buf, name_len);
if (prefix) {
uri_prefix->buf = prefix->uri.buf;
uri_prefix->len = prefix->uri.n_bytes;
uri_suffix->buf = colon + 1;
- uri_suffix->len = curie->n_bytes - (colon - curie->buf) - 1;
+ uri_suffix->len = curie->n_bytes - name_len - 1;
return SERD_SUCCESS;
}
return SERD_ERR_BAD_CURIE;