From e7a647fe8fd40eb273e9ce43da0e68f02ddb96cf Mon Sep 17 00:00:00 2001 From: ngie Date: Sun, 13 Dec 2015 03:45:57 +0000 Subject: MFC r291983,r291984: r291983: Fix compilation warnings by adding unistd.h #include and missing return statements Sponsored by: EMC / Isilon Storage Division r291984: Add missing stdlib.h header Apply some minor style(9) fixes Sponsored by: EMC / Isilon Storage Division --- tools/regression/tls/ttls2/ttls2.c | 10 ++++++++-- tools/regression/tls/ttls4/ttls4.c | 7 +++++-- 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'tools/regression') diff --git a/tools/regression/tls/ttls2/ttls2.c b/tools/regression/tls/ttls2/ttls2.c index f528e3d..15eb640 100644 --- a/tools/regression/tls/ttls2/ttls2.c +++ b/tools/regression/tls/ttls2/ttls2.c @@ -1,7 +1,8 @@ /* $FreeBSD$ */ -#include #include +#include +#include int __thread i; @@ -13,6 +14,7 @@ foo1(void *arg) printf("thread %p, i = %d\n", pthread_self(), i); sleep(1); } + return (NULL); } void * @@ -23,9 +25,11 @@ foo2(void *arg) printf("thread %p, i = %d\n", pthread_self(), i); sleep(1); } + return (NULL); } -int main(int argc, char** argv) +int +main(int argc, char** argv) { pthread_t t1, t2; @@ -33,4 +37,6 @@ int main(int argc, char** argv) pthread_create(&t2, 0, foo2, 0); pthread_join(t1, 0); pthread_join(t2, 0); + + return (0); } diff --git a/tools/regression/tls/ttls4/ttls4.c b/tools/regression/tls/ttls4/ttls4.c index d55e51b..914b220 100644 --- a/tools/regression/tls/ttls4/ttls4.c +++ b/tools/regression/tls/ttls4/ttls4.c @@ -9,11 +9,13 @@ #include #include +#include #include int __thread n; -void *f1(void *arg) +void +*f1(void *arg) { if (n != 0) { printf("bug, n == %d \n", n); @@ -23,7 +25,8 @@ void *f1(void *arg) return (0); } -int main() +int +main(void) { pthread_t td; int i; -- cgit v1.1