diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2001-08-23 04:26:06 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2001-08-23 04:26:06 +0000 |
commit | 254f7200ee45570299fcd3d272dd82c49fed6ef3 (patch) | |
tree | d90832bf8c6361a8d493528d88413c9e56afcb7f /regress/lib/libpthread/poll/poll.c | |
parent | 2f85919fc122b831358535e79384969cd14e897c (diff) |
while im here, remove -Wall warnings.
Diffstat (limited to 'regress/lib/libpthread/poll/poll.c')
-rw-r--r-- | regress/lib/libpthread/poll/poll.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/regress/lib/libpthread/poll/poll.c b/regress/lib/libpthread/poll/poll.c index 360f8f800cb..fc0d9422cce 100644 --- a/regress/lib/libpthread/poll/poll.c +++ b/regress/lib/libpthread/poll/poll.c @@ -1,4 +1,4 @@ -/* $OpenBSD: poll.c,v 1.1 2001/08/15 14:37:12 fgsch Exp $ */ +/* $OpenBSD: poll.c,v 1.2 2001/08/23 04:26:05 fgsch Exp $ */ /* David Leonard <d@openbsd.org>, 2001. Public Domain. */ #include <pthread.h> @@ -33,7 +33,7 @@ static void * writer(arg) void *arg; { - int fd = (int)arg; + int fd = *(int *)arg; const char msg[1] = { '!' }; ASSERTe(write(fd, &msg, sizeof msg), == sizeof msg); @@ -44,7 +44,7 @@ static void * reader(arg) void *arg; { - int fd = (int)arg; + int fd = *(int *)arg; char buf[1]; ASSERTe(read(fd, &buf, sizeof buf), == sizeof buf); @@ -122,14 +122,14 @@ main(argc, argv) /* Start a writing thread to the write end [1] */ printf("bg writing to wpipe\n"); - CHECKr(pthread_create(&t, NULL, writer, (void *)tube[1])); + CHECKr(pthread_create(&t, NULL, writer, (void *)&tube[1])); /* The read end [0] should soon be ready for read (POLLIN) */ p[0].fd = tube[0]; p[0].events = POLLIN; ASSERTe(poll(p, 1, INFTIM), == 1); printf("rpipe p[0]="); print_pollfd(&p[0]); putchar('\n'); ASSERT(p[0].revents == POLLIN); - reader((void *)tube[0]); /* consume */ + reader((void *)&tube[0]); /* consume */ CHECKr(pthread_join(t, &result)); SUCCEED; |