../lib/util/tests/tfork.c:483:24: error: passing argument 1 to
restrict-qualified parameter aliases with argument 4 [-Werror=restrict]
ret = pthread_create(&threads[i],
^~~~~~~~~~~
../lib/util/tests/tfork.c:486:10:
(void *)&threads[i]);
~~~~~~~~~~~~~~~~~~~
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13437
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
struct tfork *t = NULL;
int status;
pid_t child;
- pthread_t *ptid = (pthread_t *)p;
- uint64_t tid;
+ uint64_t tid = (uint64_t)pthread_self();
uint64_t *result = NULL;
int up[2];
ssize_t nread;
pthread_exit(NULL);
}
- tid = (uint64_t)*ptid;
-
t = tfork_create();
if (t == NULL) {
pthread_exit(NULL);
#endif
for (i = 0; i < num_threads; i++) {
- ret = pthread_create(&threads[i], NULL, tfork_thread, &threads[i]);
+ ret = pthread_create(&threads[i], NULL, tfork_thread, NULL);
torture_assert_goto(tctx, ret == 0, ok, done,
"pthread_create failed\n");
}