Date: Tue, 8 Dec 2015 05:24:06 +0000 (UTC) From: Garrett Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291983 - head/tools/regression/tls/ttls2 Message-ID: <201512080524.tB85O6kc031509@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Tue Dec 8 05:24:06 2015 New Revision: 291983 URL: https://svnweb.freebsd.org/changeset/base/291983 Log: Fix compilation warnings by adding unistd.h #include and missing return statements MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/tls/ttls2/ttls2.c Modified: head/tools/regression/tls/ttls2/ttls2.c ============================================================================== --- head/tools/regression/tls/ttls2/ttls2.c Tue Dec 8 05:17:22 2015 (r291982) +++ head/tools/regression/tls/ttls2/ttls2.c Tue Dec 8 05:24:06 2015 (r291983) @@ -1,7 +1,8 @@ /* $FreeBSD$ */ -#include <stdio.h> #include <pthread.h> +#include <stdio.h> +#include <unistd.h> 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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512080524.tB85O6kc031509>