Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/cddl/osnet/dist/lib/libdtrace/common Fix printf for...
details: https://anonhg.NetBSD.org/src/rev/c66f80c81584
branches: trunk
changeset: 343443:c66f80c81584
user: roy <roy%NetBSD.org@localhost>
date: Thu Feb 04 17:27:32 2016 +0000
description:
Fix printf formats and casts.
diffstat:
external/cddl/osnet/dist/lib/libdtrace/common/dt_ident.c | 10 +++++-----
external/cddl/osnet/dist/lib/libdtrace/common/dt_parser.c | 15 ++++++++-------
2 files changed, 13 insertions(+), 12 deletions(-)
diffs (84 lines):
diff -r 774a0ff4d3a3 -r c66f80c81584 external/cddl/osnet/dist/lib/libdtrace/common/dt_ident.c
--- a/external/cddl/osnet/dist/lib/libdtrace/common/dt_ident.c Thu Feb 04 16:58:11 2016 +0000
+++ b/external/cddl/osnet/dist/lib/libdtrace/common/dt_ident.c Thu Feb 04 17:27:32 2016 +0000
@@ -358,7 +358,7 @@
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 @@
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 @@
} 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 @@
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) {
diff -r 774a0ff4d3a3 -r c66f80c81584 external/cddl/osnet/dist/lib/libdtrace/common/dt_parser.c
--- a/external/cddl/osnet/dist/lib/libdtrace/common/dt_parser.c Thu Feb 04 16:58:11 2016 +0000
+++ b/external/cddl/osnet/dist/lib/libdtrace/common/dt_parser.c Thu Feb 04 17:27:32 2016 +0000
@@ -1280,7 +1280,7 @@
}
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 @@
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);
Home |
Main Index |
Thread Index |
Old Index