diff options
| author | Marcel Moolenaar <marcel@FreeBSD.org> | 2008-08-06 03:14:18 +0000 |
|---|---|---|
| committer | Marcel Moolenaar <marcel@FreeBSD.org> | 2008-08-06 03:14:18 +0000 |
| commit | f60a5b31c857e1cbcafdb8ffa8b7552b6d64f7ca (patch) | |
| tree | f795ef767eaa386eb9a97ba3f1d169f3b4a11c2e /lib/libthread_db/libthr_db.c | |
| parent | aa91bee2dcd3da3db61955d9c82f428d7cc8ed03 (diff) | |
Notes
Diffstat (limited to 'lib/libthread_db/libthr_db.c')
| -rw-r--r-- | lib/libthread_db/libthr_db.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/lib/libthread_db/libthr_db.c b/lib/libthread_db/libthr_db.c index bb5b46ddf609..cdf2257323ca 100644 --- a/lib/libthread_db/libthr_db.c +++ b/lib/libthread_db/libthr_db.c @@ -245,11 +245,9 @@ pt_ta_map_lwp2thr(const td_thragent_t *ta, lwpid_t lwp, td_thrhandle_t *th) } static td_err_e -pt_ta_thr_iter(const td_thragent_t *ta, - td_thr_iter_f *callback, void *cbdata_p, - td_thr_state_e state, int ti_pri, - sigset_t *ti_sigmask_p, - unsigned int ti_user_flags) +pt_ta_thr_iter(const td_thragent_t *ta, td_thr_iter_f *callback, + void *cbdata_p, td_thr_state_e state __unused, int ti_pri __unused, + sigset_t *ti_sigmask_p __unused, unsigned int ti_user_flags __unused) { TAILQ_HEAD(, pthread) thread_list; td_thrhandle_t th; @@ -288,7 +286,7 @@ pt_ta_thr_iter(const td_thragent_t *ta, static td_err_e pt_ta_tsd_iter(const td_thragent_t *ta, td_key_iter_f *ki, void *arg) { - char *keytable; + void *keytable; void *destructor; int i, ret, allocated; @@ -304,10 +302,10 @@ pt_ta_tsd_iter(const td_thragent_t *ta, td_key_iter_f *ki, void *arg) return (P2T(ret)); } for (i = 0; i < ta->thread_max_keys; i++) { - allocated = *(int *)(keytable + i * ta->thread_size_key + - ta->thread_off_key_allocated); - destructor = *(void **)(keytable + i * ta->thread_size_key + - ta->thread_off_key_destructor); + allocated = *(int *)(void *)((uintptr_t)keytable + + i * ta->thread_size_key + ta->thread_off_key_allocated); + destructor = *(void **)(void *)((uintptr_t)keytable + + i * ta->thread_size_key + ta->thread_off_key_destructor); if (allocated) { ret = (ki)(i, destructor, arg); if (ret != 0) { @@ -422,7 +420,7 @@ pt_ta_event_getmsg(const td_thragent_t *ta, td_event_msg_t *msg) static td_err_e pt_dbsuspend(const td_thrhandle_t *th, int suspend) { - td_thragent_t *ta = (td_thragent_t *)th->th_ta; + const td_thragent_t *ta = th->th_ta; int ret; TDBG_FUNC(); @@ -662,7 +660,7 @@ static td_err_e pt_thr_event_getmsg(const td_thrhandle_t *th, td_event_msg_t *msg) { static td_thrhandle_t handle; - td_thragent_t *ta = (td_thragent_t *)th->th_ta; + const td_thragent_t *ta = th->th_ta; psaddr_t pt, pt_temp; long lwp; int ret; @@ -703,7 +701,7 @@ pt_thr_event_getmsg(const td_thrhandle_t *th, td_event_msg_t *msg) } static td_err_e -pt_thr_sstep(const td_thrhandle_t *th, int step) +pt_thr_sstep(const td_thrhandle_t *th, int step __unused) { TDBG_FUNC(); |
