Skip to content

Commit 70d95e1

Browse files
committed
Explicit cast to (struct pthread_internal_t *) to avoid warnings.
1 parent 3f42f12 commit 70d95e1

4 files changed

+4
-4
lines changed

pt-docancel.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ int
3131
__pthread_do_cancel (struct pthread_internal_t *p)
3232
{
3333

34-
if(p == pthread_self())
34+
if(p == (struct pthread_internal_t *)pthread_self())
3535
call_exit ();
3636
else if(p->attr.flags & PTHREAD_ATTR_FLAG_CANCEL_HANDLER)
3737
pthread_kill((pthread_t)p, SIGRTMIN);

pt-setcancelstate.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
int
2626
pthread_setcancelstate (int state, int *oldstate)
2727
{
28-
struct pthread_internal_t *p = pthread_self();
28+
struct pthread_internal_t *p = (struct pthread_internal_t*)pthread_self();
2929
int newflags;
3030

3131
pthread_init();

pt-setcanceltype.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
int
2626
pthread_setcanceltype (int type, int *oldtype)
2727
{
28-
struct pthread_internal_t *p = pthread_self();
28+
struct pthread_internal_t *p = (struct pthread_internal_t*)pthread_self();
2929
int newflags;
3030

3131
pthread_init();

pt-testcancel.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
void
2525
pthread_testcancel (void)
2626
{
27-
struct pthread_internal_t *p = pthread_self();
27+
struct pthread_internal_t *p = (struct pthread_internal_t*)pthread_self();
2828
int cancelled;
2929

3030
pthread_init();

0 commit comments

Comments
 (0)