summaryrefslogtreecommitdiffstats
path: root/sys/geom
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-03-28 10:09:24 +0000
committerphk <phk@FreeBSD.org>2002-03-28 10:09:24 +0000
commite11a1be17eba2b9cbc07d42a9ebe9a746aa77ad2 (patch)
treefb0250a8b041e644c6efdcd2b455c023c53aac58 /sys/geom
parent2475368c6178ad8081b1dfc31db1adc2e254ea3e (diff)
downloadFreeBSD-src-e11a1be17eba2b9cbc07d42a9ebe9a746aa77ad2.zip
FreeBSD-src-e11a1be17eba2b9cbc07d42a9ebe9a746aa77ad2.tar.gz
In the absense of any smarter way to do this, cast various printf
arguments to silence printf format warnings.
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/geom_bsd.c2
-rw-r--r--sys/geom/geom_dev.c5
-rw-r--r--sys/geom/geom_dump.c2
-rw-r--r--sys/geom/geom_mbr.c2
-rw-r--r--sys/geom/geom_slice.c14
-rw-r--r--sys/geom/geom_subr.c3
6 files changed, 15 insertions, 13 deletions
diff --git a/sys/geom/geom_bsd.c b/sys/geom/geom_bsd.c
index b982b8b..6275bdc 100644
--- a/sys/geom/geom_bsd.c
+++ b/sys/geom/geom_bsd.c
@@ -360,7 +360,7 @@ g_bsd_taste(struct g_class *mp, struct g_provider *pp, int flags)
if (error) {
mediasize = 0;
printf("g_error %d Mediasize is %lld bytes\n",
- error, mediasize);
+ error, (long long)mediasize);
}
error = g_bsd_i386(cp, secsize, &ms->ondisk);
if (error)
diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c
index 05cd563..31ca442 100644
--- a/sys/geom/geom_dev.c
+++ b/sys/geom/geom_dev.c
@@ -157,7 +157,7 @@ g_dev_taste(struct g_class *mp, struct g_provider *pp, int insist __unused)
if (error) {
mediasize = 0;
printf("g_error %d Mediasize is %lld bytes\n",
- error, mediasize);
+ error, (long long)mediasize);
}
g_topology_lock();
g_access_rel(cp, -1, 0, 0);
@@ -169,7 +169,8 @@ g_dev_taste(struct g_class *mp, struct g_provider *pp, int insist __unused)
mtx_lock(&Giant);
if (mediasize != 0)
printf("GEOM: \"%s\" %lld bytes in %lld sectors of %u bytes\n",
- pp->name, mediasize, mediasize / secsize, secsize);
+ pp->name, (long long)mediasize,
+ (long long)mediasize / secsize, secsize);
else
printf("GEOM: \"%s\" (size unavailable)\n", pp->name);
dev = make_dev(&g_dev_cdevsw, unit++,
diff --git a/sys/geom/geom_dump.c b/sys/geom/geom_dump.c
index f8648d4..4605d97 100644
--- a/sys/geom/geom_dump.c
+++ b/sys/geom/geom_dump.c
@@ -138,7 +138,7 @@ static void
g_conf_provider(struct sbuf *sb, struct g_provider *pp)
{
- sbuf_printf(sb, "\t<provider>\n", pp);
+ sbuf_printf(sb, "\t<provider>\n");
sbuf_printf(sb, "\t <ref>%p</ref>\n", pp);
sbuf_printf(sb, "\t <geom><ref>%p</ref></geom>\n", pp->geom);
sbuf_printf(sb, "\t <mode>r%dw%de%d</mode>\n",
diff --git a/sys/geom/geom_mbr.c b/sys/geom/geom_mbr.c
index 569242d..e2e199d 100644
--- a/sys/geom/geom_mbr.c
+++ b/sys/geom/geom_mbr.c
@@ -176,7 +176,7 @@ g_mbr_taste(struct g_class *mp, struct g_provider *pp, int insist)
if (sizeof(struct dos_partition) != 16) {
printf("WARNING: struct dos_partition compiles to %d bytes, should be 16.\n",
- sizeof(struct dos_partition));
+ (int)sizeof(struct dos_partition));
return (NULL);
}
g_trace(G_T_TOPOLOGY, "mbr_taste(%s,%s)", mp->name, pp->name);
diff --git a/sys/geom/geom_slice.c b/sys/geom/geom_slice.c
index da4d08a..2df1ed0 100644
--- a/sys/geom/geom_slice.c
+++ b/sys/geom/geom_slice.c
@@ -176,13 +176,13 @@ g_slice_dumpconf(struct sbuf *sb, char *indent, struct g_geom *gp, struct g_cons
if (pp != NULL) {
sbuf_printf(sb, "%s<index>%u</index>\n", indent, pp->index);
sbuf_printf(sb, "%s<length>%llu</length>\n",
- indent, gsp->slices[pp->index].length);
- sbuf_printf(sb, "%s<seclength>%llu</seclength>\n",
- indent, gsp->slices[pp->index].length / 512);
- sbuf_printf(sb, "%s<offset>%llu</offset>\n",
- indent, gsp->slices[pp->index].offset);
- sbuf_printf(sb, "%s<secoffset>%llu</secoffset>\n",
- indent, gsp->slices[pp->index].offset / 512);
+ indent, (unsigned long long)gsp->slices[pp->index].length);
+ sbuf_printf(sb, "%s<seclength>%llu</seclength>\n", indent,
+ (unsigned long long)gsp->slices[pp->index].length / 512);
+ sbuf_printf(sb, "%s<offset>%llu</offset>\n", indent,
+ (unsigned long long)gsp->slices[pp->index].offset);
+ sbuf_printf(sb, "%s<secoffset>%llu</secoffset>\n", indent,
+ (unsigned long long)gsp->slices[pp->index].offset / 512);
}
}
diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c
index 2acfef8..42b3f62 100644
--- a/sys/geom/geom_subr.c
+++ b/sys/geom/geom_subr.c
@@ -466,7 +466,8 @@ g_haveattr(struct bio *bp, char *attribute, void *val, int len)
if (strcmp(bp->bio_attribute, attribute))
return (0);
if (bp->bio_length != len) {
- printf("bio_length %lld len %d -> EFAULT\n", bp->bio_length, len);
+ printf("bio_length %lld len %d -> EFAULT\n",
+ (long long)bp->bio_length, len);
error = EFAULT;
} else {
error = 0;
OpenPOWER on IntegriCloud