From 26ada4b390d67732f86ca80952574ba039eecdf5 Mon Sep 17 00:00:00 2001 From: marcel Date: Thu, 31 Jul 2008 16:26:58 +0000 Subject: [PATCH] Cleanup for WARNS 3. --- lib/libthread_db/Makefile | 2 +- lib/libthread_db/arch/amd64/libpthread_md.c | 3 +++ lib/libthread_db/arch/arm/libpthread_md.c | 3 +-- lib/libthread_db/arch/i386/libpthread_md.c | 5 ++--- lib/libthread_db/arch/ia64/libpthread_md.c | 3 +++ lib/libthread_db/arch/powerpc/libpthread_md.c | 3 +-- lib/libthread_db/arch/sparc64/libpthread_md.c | 3 +++ lib/libthread_db/libpthread_db.c | 4 ++-- lib/libthread_db/libpthread_db.h | 13 +++++++------ 9 files changed, 23 insertions(+), 16 deletions(-) diff --git a/lib/libthread_db/Makefile b/lib/libthread_db/Makefile index e08bb0de533a..8e1633335c78 100644 --- a/lib/libthread_db/Makefile +++ b/lib/libthread_db/Makefile @@ -9,7 +9,7 @@ SRCS+= libpthread_md.c SRCS+= libpthread_db.c SRCS+= libthr_db.c INCS= thread_db.h -WARNS?= 2 +WARNS?= 3 CFLAGS+=-I. -I${.CURDIR} SYM_MAPS+=${.CURDIR}/Symbol.map diff --git a/lib/libthread_db/arch/amd64/libpthread_md.c b/lib/libthread_db/arch/amd64/libpthread_md.c index 2a635c6d128a..646d36d564fe 100644 --- a/lib/libthread_db/arch/amd64/libpthread_md.c +++ b/lib/libthread_db/arch/amd64/libpthread_md.c @@ -30,8 +30,11 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include "libpthread_db.h" + void pt_reg_to_ucontext(const struct reg *r, ucontext_t *uc) { diff --git a/lib/libthread_db/arch/arm/libpthread_md.c b/lib/libthread_db/arch/arm/libpthread_md.c index 88a804f060d7..74d21b45f1c0 100644 --- a/lib/libthread_db/arch/arm/libpthread_md.c +++ b/lib/libthread_db/arch/arm/libpthread_md.c @@ -27,9 +27,8 @@ #include __FBSDID("$FreeBSD$"); -#include #include -#include +#include #include #include "libpthread_db.h" diff --git a/lib/libthread_db/arch/i386/libpthread_md.c b/lib/libthread_db/arch/i386/libpthread_md.c index dc14e6080872..d41865f521e3 100644 --- a/lib/libthread_db/arch/i386/libpthread_md.c +++ b/lib/libthread_db/arch/i386/libpthread_md.c @@ -27,11 +27,10 @@ #include __FBSDID("$FreeBSD$"); -#include #include -#include -#include #include +#include +#include #include "libpthread_db.h" diff --git a/lib/libthread_db/arch/ia64/libpthread_md.c b/lib/libthread_db/arch/ia64/libpthread_md.c index 7553ed117eae..3e85102a747e 100644 --- a/lib/libthread_db/arch/ia64/libpthread_md.c +++ b/lib/libthread_db/arch/ia64/libpthread_md.c @@ -28,8 +28,11 @@ __FBSDID("$FreeBSD$"); #include +#include #include +#include "libpthread_db.h" + void pt_reg_to_ucontext(const struct reg *r, ucontext_t *uc) { diff --git a/lib/libthread_db/arch/powerpc/libpthread_md.c b/lib/libthread_db/arch/powerpc/libpthread_md.c index 955cc8ed4800..b5cccb573a91 100644 --- a/lib/libthread_db/arch/powerpc/libpthread_md.c +++ b/lib/libthread_db/arch/powerpc/libpthread_md.c @@ -27,9 +27,8 @@ #include __FBSDID("$FreeBSD$"); -#include #include -#include +#include #include #include "libpthread_db.h" diff --git a/lib/libthread_db/arch/sparc64/libpthread_md.c b/lib/libthread_db/arch/sparc64/libpthread_md.c index 7553ed117eae..3e85102a747e 100644 --- a/lib/libthread_db/arch/sparc64/libpthread_md.c +++ b/lib/libthread_db/arch/sparc64/libpthread_md.c @@ -28,8 +28,11 @@ __FBSDID("$FreeBSD$"); #include +#include #include +#include "libpthread_db.h" + void pt_reg_to_ucontext(const struct reg *r, ucontext_t *uc) { diff --git a/lib/libthread_db/libpthread_db.c b/lib/libthread_db/libpthread_db.c index 527cd850c95b..2757dfb259a8 100644 --- a/lib/libthread_db/libpthread_db.c +++ b/lib/libthread_db/libpthread_db.c @@ -70,7 +70,7 @@ ps2td(int c) } static long -pt_map_thread(const td_thragent_t *const_ta, psaddr_t pt, int type) +pt_map_thread(const td_thragent_t *const_ta, psaddr_t pt, enum pt_type type) { td_thragent_t *ta = __DECONST(td_thragent_t *, const_ta); struct pt_map *new; @@ -1073,7 +1073,7 @@ pt_validate(const td_thrhandle_t *th) return (TD_OK); } -td_err_e +static td_err_e pt_thr_tls_get_addr(const td_thrhandle_t *th, psaddr_t _linkmap, size_t offset, psaddr_t *address) { diff --git a/lib/libthread_db/libpthread_db.h b/lib/libthread_db/libpthread_db.h index 188da4842732..44c5de6ce93c 100644 --- a/lib/libthread_db/libpthread_db.h +++ b/lib/libthread_db/libpthread_db.h @@ -34,13 +34,14 @@ #include "thread_db_int.h" -struct pt_map { - enum { - PT_NONE, - PT_USER, - PT_LWP - } type; +enum pt_type { + PT_NONE, + PT_USER, + PT_LWP +}; +struct pt_map { + enum pt_type type; union { lwpid_t lwp; psaddr_t thr;