Skip to content

Commit 70e0c9f

Browse files
committed
Fix another warning from gcc
1 parent c688802 commit 70e0c9f

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

tests/exit2.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,17 @@
4444
void *
4545
func(void * arg)
4646
{
47-
pthread_exit(arg);
47+
int failed = (int) arg;
4848

49-
/* Never reached. */
50-
assert(0);
49+
pthread_exit(arg);
5150

52-
return NULL;
51+
/* Never reached. */
52+
/*
53+
* Trick gcc compiler into not issuing a warning here
54+
*/
55+
assert(failed - (int)arg);
56+
57+
return NULL;
5358
}
5459

5560
int

0 commit comments

Comments
 (0)