diff options
author | delphij <delphij@FreeBSD.org> | 2005-03-14 04:33:13 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2005-03-14 04:33:13 +0000 |
commit | ebc7aa2a14fe61ab205a6ffa8fc80e0f250f11df (patch) | |
tree | 3581d49ed0844ceca29f72a17f7cd8d4ecc174fc /sbin/geom/core/geom.c | |
parent | c9b5162e946e45867004597988279d03bf971081 (diff) | |
download | FreeBSD-src-ebc7aa2a14fe61ab205a6ffa8fc80e0f250f11df.zip FreeBSD-src-ebc7aa2a14fe61ab205a6ffa8fc80e0f250f11df.tar.gz |
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
Diffstat (limited to 'sbin/geom/core/geom.c')
-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 af009a7..dd10163 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; |