From 8cbe402e5a6a2849492e6899c2eb20679725ff1d Mon Sep 17 00:00:00 2001 From: ngie Date: Sun, 13 Dec 2015 03:47:56 +0000 Subject: [PATCH] MFstable/10 r292142: 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 git-svn-id: svn://svn.freebsd.org/base/stable/9@292143 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- tools/regression/tls/ttls2/ttls2.c | 10 ++++++++-- tools/regression/tls/ttls4/ttls4.c | 7 +++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/tools/regression/tls/ttls2/ttls2.c b/tools/regression/tls/ttls2/ttls2.c index f528e3dcc..15eb640e3 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 d55e51bfc..914b220f5 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; -- 2.45.0