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/tools/ctf/cvt %j needs uintmax_t no...
details: https://anonhg.NetBSD.org/src/rev/fdaac42934b0
branches: trunk
changeset: 340695:fdaac42934b0
user: christos <christos%NetBSD.org@localhost>
date: Thu Sep 24 19:16:06 2015 +0000
description:
%j needs uintmax_t not uintptr_t
diffstat:
external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c | 25 ++++++++++++----------
external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c | 18 +++++++---------
2 files changed, 22 insertions(+), 21 deletions(-)
diffs (164 lines):
diff -r 6f1c62445d54 -r fdaac42934b0 external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c
--- a/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c Thu Sep 24 18:37:33 2015 +0000
+++ b/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c Thu Sep 24 19:16:06 2015 +0000
@@ -400,7 +400,7 @@
slot->wip_nmerged = 1;
} else {
debug(2, "0x%jx: merging %p into %p\n",
- (uintptr_t)pthread_self(),
+ (uintmax_t)(uintptr_t)pthread_self(),
(void *)pow, (void *)slot->wip_td);
merge_into_master(pow, slot->wip_td, NULL, 0);
@@ -471,7 +471,7 @@
pthread_mutex_unlock(&wq->wq_queue_lock);
debug(2, "0x%jx: entering p2 completion barrier\n",
- (uintptr_t)pthread_self());
+ (uintmax_t)(uintptr_t)pthread_self());
if (barrier_wait(&wq->wq_bar1)) {
pthread_mutex_lock(&wq->wq_queue_lock);
wq->wq_alldone = 1;
@@ -499,7 +499,7 @@
pthread_mutex_unlock(&wq->wq_queue_lock);
debug(2, "0x%jx: merging %p into %p\n",
- (uintptr_t)pthread_self(),
+ (uintmax_t)(uintptr_t)pthread_self(),
(void *)pow1, (void *)pow2);
merge_into_master(pow1, pow2, NULL, 0);
tdata_free(pow1);
@@ -518,7 +518,7 @@
fifo_add(wq->wq_queue, pow2);
debug(2, "0x%jx: added %p to queue, len now %d, ninqueue %d\n",
- (uintptr_t)pthread_self(), (void *)pow2,
+ (uintmax_t)(uintptr_t)pthread_self(), (void *)pow2,
fifo_len(wq->wq_queue), wq->wq_ninqueue);
pthread_cond_broadcast(&wq->wq_done_cv);
pthread_cond_signal(&wq->wq_work_avail);
@@ -534,27 +534,30 @@
{
worker_runphase1(wq);
- debug(2, "0x%jx: entering first barrier\n", (uintptr_t)pthread_self());
+ debug(2, "0x%jx: entering first barrier\n",
+ (uintmax_t)(uintptr_t)pthread_self());
if (barrier_wait(&wq->wq_bar1)) {
debug(2, "0x%jx: doing work in first barrier\n",
- (uintptr_t)pthread_self());
+ (uintmax_t)(uintptr_t)pthread_self());
finalize_phase_one(wq);
init_phase_two(wq);
debug(2, "0x%jx: ninqueue is %d, %d on queue\n",
- (uintptr_t)pthread_self(),
+ (uintmax_t)(uintptr_t)pthread_self(),
wq->wq_ninqueue, fifo_len(wq->wq_queue));
}
- debug(2, "0x%jx: entering second barrier\n", (uintptr_t)pthread_self());
+ debug(2, "0x%jx: entering second barrier\n",
+ (uintmax_t)(uintptr_t)pthread_self());
(void) barrier_wait(&wq->wq_bar2);
- debug(2, "0x%jx: phase 1 complete\n", (uintptr_t)pthread_self());
+ debug(2, "0x%jx: phase 1 complete\n",
+ (uintmax_t)(uintptr_t)pthread_self());
worker_runphase2(wq);
}
@@ -578,8 +581,8 @@
}
fifo_add(wq->wq_queue, td);
- debug(1, "Thread 0x%jx announcing %s\n", (uintptr_t)pthread_self(),
- name);
+ debug(1, "Thread 0x%jx announcing %s\n",
+ (uintmax_t)(uintptr_t)pthread_self(), name);
pthread_cond_broadcast(&wq->wq_work_avail);
pthread_mutex_unlock(&wq->wq_queue_lock);
diff -r 6f1c62445d54 -r fdaac42934b0 external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c
--- a/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c Thu Sep 24 18:37:33 2015 +0000
+++ b/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c Thu Sep 24 19:16:06 2015 +0000
@@ -1672,7 +1672,7 @@
if ((name1 = die_name(dw, arg)) == NULL) {
terminate("die %ju: func arg %d has no name\n",
- (uintptr_t)off, ii->ii_nargs + 1);
+ (uintmax_t)off, ii->ii_nargs + 1);
}
if (strcmp(name1, "...") == 0) {
@@ -1688,7 +1688,7 @@
int i;
debug(3, "die %ju: function has %d argument%s\n",
- (uintptr_t)off, ii->ii_nargs, ii->ii_nargs == 1 ? "" : "s");
+ (uintmax_t)off, ii->ii_nargs, ii->ii_nargs == 1 ? "" : "s");
ii->ii_args = xcalloc(sizeof (tdesc_t) * ii->ii_nargs);
@@ -1713,7 +1713,7 @@
iidesc_t *ii;
char *name;
- debug(3, "die %ju: creating object definition\n", (uintptr_t)off);
+ debug(3, "die %ju: creating object definition\n", (uintmax_t)off);
if (die_isdecl(dw, die) || (name = die_name(dw, die)) == NULL)
return; /* skip prototypes and nameless objects */
@@ -1810,18 +1810,18 @@
Dwarf_Half tag;
tdesc_t *tdp;
- debug(3, "die %ju <0x%jx>: create_one\n", (uintptr_t)off,
- (uintptr_t)off);
+ debug(3, "die %ju <0x%jx>: create_one\n", (uintmax_t)off,
+ (uintmax_t)off);
if (off > dw->dw_maxoff) {
- terminate("illegal die offset %ju (max %ju)\n", (uintptr_t)off,
+ terminate("illegal die offset %ju (max %ju)\n", (uintmax_t)off,
dw->dw_maxoff);
}
tag = die_tag(dw, die);
if ((dc = die_tag2ctor(tag)) == NULL) {
- debug(2, "die %ju: ignoring tag type %x\n", (uintptr_t)off,
+ debug(2, "die %ju: ignoring tag type %x\n", (uintmax_t)off,
tag);
return;
}
@@ -2019,7 +2019,6 @@
}
if ((rc = dwarf_next_cu_header_b(dw.dw_dw, &hdrlen, &vers, &abboff,
-/*###2022 [cc] error: passing argument 4 of 'dwarf_next_cu_header_b' from incompatible pointer type [-Werror]%%%*/
&addrsz, &offsz, NULL, &nxthdr, &dw.dw_err)) != DW_DLV_OK)
terminate("rc = %d %s\n", rc, dwarf_errmsg(dw.dw_err));
@@ -2029,7 +2028,7 @@
if ((child = die_child(&dw, cu)) == NULL) {
Dwarf_Unsigned lang;
if (die_unsigned(&dw, cu, DW_AT_language, &lang, 0)) {
- debug(1, "DWARF language: %ju\n", (uintptr_t)lang);
+ debug(1, "DWARF language: %ju\n", (uintmax_t)lang);
/*
* Assembly languages are typically that.
* They have some dwarf info, but not what
@@ -2074,7 +2073,6 @@
die_create(&dw, child);
if ((rc = dwarf_next_cu_header_b(dw.dw_dw, &hdrlen, &vers, &abboff,
-/*###2076 [cc] error: passing argument 4 of 'dwarf_next_cu_header_b' from incompatible pointer type [-Werror]%%%*/
&addrsz, &offsz, NULL, &nxthdr, &dw.dw_err)) != DW_DLV_NO_ENTRY)
terminate("multiple compilation units not supported\n");
Home |
Main Index |
Thread Index |
Old Index