In the absense of any smarter way to do this, cast various printf
arguments to silence printf format warnings.
This commit is contained in:
parent
9c7b6adc2a
commit
4c0a424c67
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=93326
@ -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)
|
||||
|
@ -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++,
|
||||
|
@ -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",
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user