Cleanup for WARNS 6.
This commit is contained in:
parent
aa91bee2dc
commit
f60a5b31c8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=181341
@ -9,7 +9,7 @@ SRCS+= libpthread_md.c
|
||||
SRCS+= libpthread_db.c
|
||||
SRCS+= libthr_db.c
|
||||
INCS= thread_db.h
|
||||
WARNS?= 3
|
||||
WARNS?= 6
|
||||
|
||||
CFLAGS+=-I. -I${.CURDIR}
|
||||
SYM_MAPS+=${.CURDIR}/Symbol.map
|
||||
|
@ -85,7 +85,7 @@ pt_ucontext_to_reg(const ucontext_t *uc, struct reg *r)
|
||||
}
|
||||
|
||||
void
|
||||
pt_fpreg_to_ucontext(const struct fpreg *r, ucontext_t *uc)
|
||||
pt_fpreg_to_ucontext(const struct fpreg *r __unused, ucontext_t *uc)
|
||||
{
|
||||
mcontext_t *mc = &uc->uc_mcontext;
|
||||
|
||||
@ -94,7 +94,7 @@ pt_fpreg_to_ucontext(const struct fpreg *r, ucontext_t *uc)
|
||||
}
|
||||
|
||||
void
|
||||
pt_ucontext_to_fpreg(const ucontext_t *uc, struct fpreg *r)
|
||||
pt_ucontext_to_fpreg(const ucontext_t *uc __unused, struct fpreg *r)
|
||||
{
|
||||
|
||||
/* XXX */
|
||||
@ -107,7 +107,7 @@ pt_md_init(void)
|
||||
}
|
||||
|
||||
int
|
||||
pt_reg_sstep(struct reg *reg, int step)
|
||||
pt_reg_sstep(struct reg *reg __unused, int step __unused)
|
||||
{
|
||||
|
||||
/* XXX */
|
||||
|
@ -34,22 +34,22 @@ __FBSDID("$FreeBSD$");
|
||||
#include "libpthread_db.h"
|
||||
|
||||
void
|
||||
pt_reg_to_ucontext(const struct reg *r, ucontext_t *uc)
|
||||
pt_reg_to_ucontext(const struct reg *r __unused, ucontext_t *uc __unused)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
pt_ucontext_to_reg(const ucontext_t *uc, struct reg *r)
|
||||
pt_ucontext_to_reg(const ucontext_t *uc __unused, struct reg *r __unused)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
pt_fpreg_to_ucontext(const struct fpreg* r, ucontext_t *uc)
|
||||
pt_fpreg_to_ucontext(const struct fpreg* r __unused, ucontext_t *uc __unused)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
pt_ucontext_to_fpreg(const ucontext_t *uc, struct fpreg *r)
|
||||
pt_ucontext_to_fpreg(const ucontext_t *uc __unused, struct fpreg *r __unused)
|
||||
{
|
||||
}
|
||||
|
||||
@ -59,7 +59,7 @@ pt_md_init(void)
|
||||
}
|
||||
|
||||
int
|
||||
pt_reg_sstep(struct reg *reg, int step)
|
||||
pt_reg_sstep(struct reg *reg __unused, int step __unused)
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ pt_md_init(void)
|
||||
}
|
||||
|
||||
int
|
||||
pt_reg_sstep(struct reg *reg, int step)
|
||||
pt_reg_sstep(struct reg *reg __unused, int step __unused)
|
||||
{
|
||||
|
||||
/* XXX */
|
||||
|
@ -34,22 +34,22 @@ __FBSDID("$FreeBSD$");
|
||||
#include "libpthread_db.h"
|
||||
|
||||
void
|
||||
pt_reg_to_ucontext(const struct reg *r, ucontext_t *uc)
|
||||
pt_reg_to_ucontext(const struct reg *r __unused, ucontext_t *uc __unused)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
pt_ucontext_to_reg(const ucontext_t *uc, struct reg *r)
|
||||
pt_ucontext_to_reg(const ucontext_t *uc __unused, struct reg *r __unused)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
pt_fpreg_to_ucontext(const struct fpreg* r, ucontext_t *uc)
|
||||
pt_fpreg_to_ucontext(const struct fpreg* r __unused, ucontext_t *uc __unused)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
pt_ucontext_to_fpreg(const ucontext_t *uc, struct fpreg *r)
|
||||
pt_ucontext_to_fpreg(const ucontext_t *uc __unused, struct fpreg *r __unused)
|
||||
{
|
||||
}
|
||||
|
||||
@ -59,7 +59,7 @@ pt_md_init(void)
|
||||
}
|
||||
|
||||
int
|
||||
pt_reg_sstep(struct reg *reg, int step)
|
||||
pt_reg_sstep(struct reg *reg __unused, int step __unused)
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
|
@ -346,11 +346,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;
|
||||
@ -394,7 +392,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;
|
||||
|
||||
@ -410,10 +408,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) {
|
||||
@ -427,28 +425,32 @@ pt_ta_tsd_iter(const td_thragent_t *ta, td_key_iter_f *ki, void *arg)
|
||||
}
|
||||
|
||||
static td_err_e
|
||||
pt_ta_event_addr(const td_thragent_t *ta, td_event_e event, td_notify_t *ptr)
|
||||
pt_ta_event_addr(const td_thragent_t *ta __unused, td_event_e event __unused,
|
||||
td_notify_t *ptr __unused)
|
||||
{
|
||||
TDBG_FUNC();
|
||||
return (TD_ERR);
|
||||
}
|
||||
|
||||
static td_err_e
|
||||
pt_ta_set_event(const td_thragent_t *ta, td_thr_events_t *events)
|
||||
pt_ta_set_event(const td_thragent_t *ta __unused,
|
||||
td_thr_events_t *events __unused)
|
||||
{
|
||||
TDBG_FUNC();
|
||||
return (0);
|
||||
}
|
||||
|
||||
static td_err_e
|
||||
pt_ta_clear_event(const td_thragent_t *ta, td_thr_events_t *events)
|
||||
pt_ta_clear_event(const td_thragent_t *ta __unused,
|
||||
td_thr_events_t *events __unused)
|
||||
{
|
||||
TDBG_FUNC();
|
||||
return (0);
|
||||
}
|
||||
|
||||
static td_err_e
|
||||
pt_ta_event_getmsg(const td_thragent_t *ta, td_event_msg_t *msg)
|
||||
pt_ta_event_getmsg(const td_thragent_t *ta __unused,
|
||||
td_event_msg_t *msg __unused)
|
||||
{
|
||||
TDBG_FUNC();
|
||||
return (TD_NOMSG);
|
||||
@ -457,7 +459,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;
|
||||
psaddr_t tcb_addr, tmbx_addr, ptr;
|
||||
lwpid_t lwp;
|
||||
uint32_t dflags;
|
||||
@ -951,28 +953,31 @@ pt_thr_setgregs(const td_thrhandle_t *th, const prgregset_t gregs)
|
||||
}
|
||||
|
||||
static td_err_e
|
||||
pt_thr_event_enable(const td_thrhandle_t *th, int en)
|
||||
pt_thr_event_enable(const td_thrhandle_t *th __unused, int en __unused)
|
||||
{
|
||||
TDBG_FUNC();
|
||||
return (0);
|
||||
}
|
||||
|
||||
static td_err_e
|
||||
pt_thr_set_event(const td_thrhandle_t *th, td_thr_events_t *setp)
|
||||
pt_thr_set_event(const td_thrhandle_t *th __unused,
|
||||
td_thr_events_t *setp __unused)
|
||||
{
|
||||
TDBG_FUNC();
|
||||
return (0);
|
||||
}
|
||||
|
||||
static td_err_e
|
||||
pt_thr_clear_event(const td_thrhandle_t *th, td_thr_events_t *setp)
|
||||
pt_thr_clear_event(const td_thrhandle_t *th __unused,
|
||||
td_thr_events_t *setp __unused)
|
||||
{
|
||||
TDBG_FUNC();
|
||||
return (0);
|
||||
}
|
||||
|
||||
static td_err_e
|
||||
pt_thr_event_getmsg(const td_thrhandle_t *th, td_event_msg_t *msg)
|
||||
pt_thr_event_getmsg(const td_thrhandle_t *th __unused,
|
||||
td_event_msg_t *msg __unused)
|
||||
{
|
||||
TDBG_FUNC();
|
||||
return (TD_NOMSG);
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user