summaryrefslogtreecommitdiff
path: root/libarchive/archive_string_sprintf.c
diff options
context:
space:
mode:
authorColin Percival <cperciva@daemonology.net>2011-08-16 15:10:25 -0400
committerColin Percival <cperciva@daemonology.net>2011-08-16 15:10:25 -0400
commitc370675c463758e0db85deb5d4ff9b3a8c662e49 (patch)
tree1dd71fabca95411ac2a89f713b3721b498903744 /libarchive/archive_string_sprintf.c
parent22f4511c3062383085620627897cf33ecf467541 (diff)
downloadlibarchive-c370675c463758e0db85deb5d4ff9b3a8c662e49.tar.gz
Quash compiler warnings by explicitly casting to unsigned on both sides
of ? : expressions. Pointy hat to: cperciva SVN-Revision: 3630
Diffstat (limited to 'libarchive/archive_string_sprintf.c')
-rw-r--r--libarchive/archive_string_sprintf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libarchive/archive_string_sprintf.c b/libarchive/archive_string_sprintf.c
index 3a6fead7..7d7d9713 100644
--- a/libarchive/archive_string_sprintf.c
+++ b/libarchive/archive_string_sprintf.c
@@ -64,7 +64,7 @@ append_int(struct archive_string *as, intmax_t d, unsigned base)
if (d < 0) {
archive_strappend_char(as, '-');
- ud = (d == INTMAX_MIN) ? (uintmax_t)(INTMAX_MAX) + 1 : -d;
+ ud = (d == INTMAX_MIN) ? (uintmax_t)(INTMAX_MAX) + 1 : (uintmax_t)(-d);
} else
ud = d;
append_uint(as, ud, base);