Fix printf formats and casts.

This commit is contained in:
roy 2016-02-04 17:27:32 +00:00
parent b9ae60933c
commit 985adb8dc0
2 changed files with 13 additions and 12 deletions

View File

@ -358,7 +358,7 @@ dt_idcook_args(dt_node_t *dnp, dt_ident_t *idp, int argc, dt_node_t *ap)
if (ap->dn_value >= prp->pr_argc) {
xyerror(D_ARGS_IDX, "index %lld is out of range for %s %s[ ]\n",
(longlong_t)ap->dn_value, dtrace_desc2str(yypcb->pcb_pdesc,
(long long)ap->dn_value, dtrace_desc2str(yypcb->pcb_pdesc,
n1, sizeof (n1)), idp->di_name);
}
@ -374,12 +374,12 @@ dt_idcook_args(dt_node_t *dnp, dt_ident_t *idp, int argc, dt_node_t *ap)
if (xnp->dn_type == CTF_ERR) {
xyerror(D_ARGS_TYPE, "failed to resolve translated type for "
"%s[%lld]\n", idp->di_name, (longlong_t)ap->dn_value);
"%s[%lld]\n", idp->di_name, (long long)ap->dn_value);
}
if (nnp->dn_type == CTF_ERR) {
xyerror(D_ARGS_TYPE, "failed to resolve native type for "
"%s[%lld]\n", idp->di_name, (longlong_t)ap->dn_value);
"%s[%lld]\n", idp->di_name, (long long)ap->dn_value);
}
if (dtp->dt_xlatemode == DT_XL_STATIC && (
@ -428,7 +428,7 @@ dt_idcook_args(dt_node_t *dnp, dt_ident_t *idp, int argc, dt_node_t *ap)
} else {
xyerror(D_ARGS_XLATOR, "translator for %s[%lld] from %s to %s "
"is not defined\n", idp->di_name, (longlong_t)ap->dn_value,
"is not defined\n", idp->di_name, (long long)ap->dn_value,
dt_node_type_name(nnp, n1, sizeof (n1)),
dt_node_type_name(xnp, n2, sizeof (n2)));
}
@ -459,7 +459,7 @@ dt_idcook_regs(dt_node_t *dnp, dt_ident_t *idp, int argc, dt_node_t *ap)
if ((ap->dn_flags & DT_NF_SIGNED) && (int64_t)ap->dn_value < 0) {
xyerror(D_REGS_IDX, "index %lld is out of range for array %s\n",
(longlong_t)ap->dn_value, idp->di_name);
(long long)ap->dn_value, idp->di_name);
}
if (dt_type_lookup("uint64_t", &dtt) == -1) {

View File

@ -1280,7 +1280,7 @@ dt_node_int(uintmax_t value)
}
xyerror(D_INT_OFLOW, "integer constant 0x%llx cannot be represented "
"in any built-in integral type\n", (u_longlong_t)value);
"in any built-in integral type\n", (unsigned long long)value);
/*NOTREACHED*/
return (NULL); /* keep gcc happy */
}
@ -2184,19 +2184,20 @@ dt_node_pdesc_by_id(uintmax_t id)
longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM);
if (id > UINT_MAX) {
xyerror(D_PDESC_INVAL, "identifier %llu exceeds maximum "
"probe id\n", (u_longlong_t)id);
xyerror(D_PDESC_INVAL, "identifier %"PRIuMAX" exceeds maximum "
"probe id\n", id);
}
if (yypcb->pcb_pspec != DTRACE_PROBESPEC_NAME) {
xyerror(D_PDESC_INVAL, "probe identifier %llu not permitted "
"when specifying %s\n", (u_longlong_t)id,
xyerror(D_PDESC_INVAL, "probe identifier %"PRIuMAX
" not permitted when specifying %s\n", id,
names[yypcb->pcb_pspec]);
}
if (dtrace_id2desc(dtp, (dtrace_id_t)id, dnp->dn_desc) != 0) {
xyerror(D_PDESC_INVAL, "invalid probe identifier %llu: %s\n",
(u_longlong_t)id, dtrace_errmsg(dtp, dtrace_errno(dtp)));
xyerror(D_PDESC_INVAL, "invalid probe identifier %"PRIuMAX
": %s\n",
id, dtrace_errmsg(dtp, dtrace_errno(dtp)));
}
return (dnp);