diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2019-06-23 23:19:34 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2019-06-23 23:19:34 +0300 |
commit | 7883d73530b4b2a701ddd7d50c35676cbc158039 (patch) | |
tree | dea64895ae28278af681691c029f3e1c8c7cedd2 /src/xz/util.c | |
parent | tuklib_cpucores: Silence warnings from -Wsign-conversion. (diff) | |
download | xz-7883d73530b4b2a701ddd7d50c35676cbc158039.tar.xz |
xz: Fix some of the warnings from -Wsign-conversion.
Diffstat (limited to '')
-rw-r--r-- | src/xz/util.c | 4 |
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; |