aboutsummaryrefslogtreecommitdiff
path: root/src/xz/util.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2019-06-23 23:19:34 +0300
committerLasse Collin <lasse.collin@tukaani.org>2019-12-31 22:19:18 +0200
commit37df03ce52ce53710e1513387648763f8a744154 (patch)
tree8cf473cb950c8e2de1038a74e89057f7c3c01910 /src/xz/util.c
parenttuklib_cpucores: Silence warnings from -Wsign-conversion. (diff)
downloadxz-37df03ce52ce53710e1513387648763f8a744154.tar.xz
xz: Fix some of the warnings from -Wsign-conversion.
Diffstat (limited to 'src/xz/util.c')
-rw-r--r--src/xz/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xz/util.c b/src/xz/util.c
index 35850f4c..39e8ec8b 100644
--- a/src/xz/util.c
+++ b/src/xz/util.c
@@ -79,7 +79,7 @@ str_to_uint64(const char *name, const char *value, uint64_t min, uint64_t max)
result *= 10;
// Another overflow check
- const uint32_t add = *value - '0';
+ const uint32_t add = (uint32_t)(*value - '0');
if (UINT64_MAX - add < result)
goto error;
@@ -243,7 +243,7 @@ my_snprintf(char **pos, size_t *left, const char *fmt, ...)
*left = 0;
} else {
*pos += len;
- *left -= len;
+ *left -= (size_t)(len);
}
return;