mirror of https://git.tukaani.org/xz.git
xz: list.c: Fix some warnings from -Wsign-conversion.
This commit is contained in:
parent
d0a78751eb
commit
50120deb01
|
@ -292,7 +292,7 @@ init_headings(void)
|
||||||
|
|
||||||
// Calculate the field width for printf("%*s") so that
|
// Calculate the field width for printf("%*s") so that
|
||||||
// the string uses .columns number of columns on a terminal.
|
// the string uses .columns number of columns on a terminal.
|
||||||
headings[i].fw = (int)(len + headings[i].columns - w);
|
headings[i].fw = (int)(len + (size_t)headings[i].columns - w);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -870,9 +870,10 @@ print_info_adv(xz_file_info *xfi, file_pair *pair)
|
||||||
// the actual check value as it is hexadecimal. However, to
|
// the actual check value as it is hexadecimal. However, to
|
||||||
// print the column heading, further calculation is needed
|
// print the column heading, further calculation is needed
|
||||||
// to handle a translated string (it's done a few lines later).
|
// to handle a translated string (it's done a few lines later).
|
||||||
|
assert(check_max <= LZMA_CHECK_SIZE_MAX);
|
||||||
const int checkval_width = my_max(
|
const int checkval_width = my_max(
|
||||||
(uint32_t)(headings[HEADING_CHECKVAL].columns),
|
headings[HEADING_CHECKVAL].columns,
|
||||||
2 * check_max);
|
(int)(2 * check_max));
|
||||||
|
|
||||||
// All except Check are right aligned; Check is left aligned.
|
// All except Check are right aligned; Check is left aligned.
|
||||||
printf(" %s\n %*s %*s %*s %*s %*s %*s %*s %-*s",
|
printf(" %s\n %*s %*s %*s %*s %*s %*s %*s %-*s",
|
||||||
|
|
Loading…
Reference in New Issue