Cast result from third parameter to int instead of promoting it to size_t

This resolves a -Wformat issue when the value is used as a format width
precision specifier, i.e. %*s

MFC after: 1 month
Reported by: clang
Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
Enji Cooper 2016-07-31 06:03:27 +00:00
parent 637a1a7446
commit 454df496b8

View File

@ -108,7 +108,7 @@ show_vdev_stats(const char *desc, const char *ctype, nvlist_t *nv, int indent)
(void) printf("%*s%s%*s%*s%*s %5s %5s %5s %5s %5s %5s %5s\n",
indent, "",
prefix,
indent + strlen(prefix) - 25 - (vs->vs_space ? 0 : 12),
(int)(indent + strlen(prefix) - 25 - (vs->vs_space ? 0 : 12)),
desc,
vs->vs_space ? 6 : 0, vs->vs_space ? used : "",
vs->vs_space ? 6 : 0, vs->vs_space ? avail : "",