Module Name: src Committed By: christos Date: Thu Sep 24 19:16:06 UTC 2015
Modified Files: src/external/cddl/osnet/dist/tools/ctf/cvt: ctfmerge.c dwarf.c Log Message: %j needs uintmax_t not uintptr_t To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 \ src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c \ src/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c diff -u src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c:1.12 src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c:1.13 --- src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c:1.12 Sun Jul 5 20:21:51 2015 +++ src/external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c Thu Sep 24 15:16:06 2015 @@ -400,7 +400,7 @@ wip_add_work(wip_t *slot, tdata_t *pow) 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 @@ worker_runphase2(workqueue_t *wq) 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 @@ worker_runphase2(workqueue_t *wq) 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 @@ worker_runphase2(workqueue_t *wq) 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_thread(workqueue_t *wq) { 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 @@ merge_ctf_cb(tdata_t *td, char *name, vo } 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); Index: src/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c diff -u src/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c:1.12 src/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c:1.13 --- src/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c:1.12 Sat Feb 7 15:30:03 2015 +++ src/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c Thu Sep 24 15:16:06 2015 @@ -1672,7 +1672,7 @@ die_function_create(dwarf_t *dw, Dwarf_D 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 @@ die_function_create(dwarf_t *dw, Dwarf_D 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 @@ die_variable_create(dwarf_t *dw, Dwarf_D 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 @@ die_create_one(dwarf_t *dw, Dwarf_Die di 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 @@ dw_read(tdata_t *td, Elf *elf, char *fil } 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 @@ dw_read(tdata_t *td, Elf *elf, char *fil 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 @@ dw_read(tdata_t *td, Elf *elf, char *fil 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");