diff options
author | Xin LI <delphij@FreeBSD.org> | 2005-03-14 04:33:13 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2005-03-14 04:33:13 +0000 |
commit | 257eeb8e0b57156af0d02ecc07039e2e55dba45e (patch) | |
tree | 3581d49ed0844ceca29f72a17f7cd8d4ecc174fc /sbin | |
parent | 42331ebeccb5d9381805f2a7081e091fc5e59973 (diff) | |
download | src-257eeb8e0b57156af0d02ecc07039e2e55dba45e.tar.gz src-257eeb8e0b57156af0d02ecc07039e2e55dba45e.zip |
printf(3) expects that %*s having an int parameter, which generates
warning on 64-bit platforms. Explicitly cast these values to int
to work around this issue, as these values are tend to be small.
Spotted by: ia64 tinderbox
Notes
Notes:
svn path=/head/; revision=143549
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/geom/core/geom.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sbin/geom/core/geom.c b/sbin/geom/core/geom.c index af009a73aa11..dd10163beabe 100644 --- a/sbin/geom/core/geom.c +++ b/sbin/geom/core/geom.c @@ -813,18 +813,18 @@ status_one_geom(struct ggeom *gp, size_t name_len, size_t status_len) name = pp->lg_name; else name = gp->lg_name; - printf("%*s", name_len, name); + printf("%*s", (int)name_len, name); LIST_FOREACH(conf, &gp->lg_config, lg_config) { if (strcasecmp(conf->lg_name, "state") == 0) { - printf(" %*s", status_len, conf->lg_val); + printf(" %*s", (int)status_len, conf->lg_val); break; } } if (conf == NULL) - printf(" %*s", status_len, "N/A"); + printf(" %*s", (int)status_len, "N/A"); LIST_FOREACH(cp, &gp->lg_consumer, lg_consumer) { if (cp != LIST_FIRST(&gp->lg_consumer)) - printf("%*s %*s", name_len, "", status_len, ""); + printf("%*s %*s", (int)name_len, "", (int)status_len, ""); if (status_one_consumer(cp) && !newline) newline = 1; } @@ -890,7 +890,7 @@ std_status(struct gctl_req *req, unsigned flags __unused) if (n == 0) goto end; } - printf("%*s %*s %s\n", name_len, "Name", status_len, "Status", + printf("%*s %*s %s\n", (int)name_len, "Name", (int)status_len, "Status", "Components"); if (*nargs > 0) { int i; |