summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2003-06-24 00:37:26 +0000
committermarcel <marcel@FreeBSD.org>2003-06-24 00:37:26 +0000
commit73291d87a715575aaa9acf4eed82ad0834ef469f (patch)
treec0475579f951ea3f9c5a80082b709f3545d39d34
parent9a60d0f2a2edf990ecdf15b750159cc83acfce6b (diff)
downloadFreeBSD-src-73291d87a715575aaa9acf4eed82ad0834ef469f.zip
FreeBSD-src-73291d87a715575aaa9acf4eed82ad0834ef469f.tar.gz
Explicitly widen int types before casting to pointer types. On 64-bit
platforms the compiler warns about incompatible integer/pointer casts and on ia64 this generally is bad news. We know that what we're doing here is valid/correct, so suppress the warning. No functional change. Sleeps better: marcel
-rw-r--r--lib/libkse/thread/thr_sig.c7
-rw-r--r--lib/libpthread/thread/thr_sig.c7
2 files changed, 8 insertions, 6 deletions
diff --git a/lib/libkse/thread/thr_sig.c b/lib/libkse/thread/thr_sig.c
index b001c7b..94e5630 100644
--- a/lib/libkse/thread/thr_sig.c
+++ b/lib/libkse/thread/thr_sig.c
@@ -195,8 +195,8 @@ _thr_sig_handler(int sig, siginfo_t *info, ucontext_t *ucp)
!= 0) || (info == NULL))
(*(sigfunc))(sig, info, ucp);
else
- (*(sigfunc))(sig, (siginfo_t *)info->si_code,
- ucp);
+ (*(sigfunc))(sig,
+ (siginfo_t*)(intptr_t)info->si_code, ucp);
}
}
else {
@@ -253,7 +253,8 @@ thr_sig_invoke_handler(struct pthread *curthread, int sig, siginfo_t *info,
(info == NULL))
(*(sigfunc))(sig, info, ucp);
else
- (*(sigfunc))(sig, (siginfo_t *)info->si_code, ucp);
+ (*(sigfunc))(sig, (siginfo_t*)(intptr_t)info->si_code,
+ ucp);
}
/*
diff --git a/lib/libpthread/thread/thr_sig.c b/lib/libpthread/thread/thr_sig.c
index b001c7b..94e5630 100644
--- a/lib/libpthread/thread/thr_sig.c
+++ b/lib/libpthread/thread/thr_sig.c
@@ -195,8 +195,8 @@ _thr_sig_handler(int sig, siginfo_t *info, ucontext_t *ucp)
!= 0) || (info == NULL))
(*(sigfunc))(sig, info, ucp);
else
- (*(sigfunc))(sig, (siginfo_t *)info->si_code,
- ucp);
+ (*(sigfunc))(sig,
+ (siginfo_t*)(intptr_t)info->si_code, ucp);
}
}
else {
@@ -253,7 +253,8 @@ thr_sig_invoke_handler(struct pthread *curthread, int sig, siginfo_t *info,
(info == NULL))
(*(sigfunc))(sig, info, ucp);
else
- (*(sigfunc))(sig, (siginfo_t *)info->si_code, ucp);
+ (*(sigfunc))(sig, (siginfo_t*)(intptr_t)info->si_code,
+ ucp);
}
/*
OpenPOWER on IntegriCloud