svn commit: r291983 - head/tools/regression/tls/ttls2

Garrett Cooper ngie at FreeBSD.org
Tue Dec 8 05:24:07 UTC 2015


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);
 }


More information about the svn-src-all mailing list