svn commit: r292143 - in stable/9/tools/regression/tls: ttls2 ttls4

Garrett Cooper ngie at FreeBSD.org
Sun Dec 13 03:47:58 UTC 2015


Author: ngie
Date: Sun Dec 13 03:47:56 2015
New Revision: 292143
URL: https://svnweb.freebsd.org/changeset/base/292143

Log:
  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

Modified:
  stable/9/tools/regression/tls/ttls2/ttls2.c
  stable/9/tools/regression/tls/ttls4/ttls4.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/tools/   (props changed)
  stable/9/tools/regression/   (props changed)

Modified: stable/9/tools/regression/tls/ttls2/ttls2.c
==============================================================================
--- stable/9/tools/regression/tls/ttls2/ttls2.c	Sun Dec 13 03:45:57 2015	(r292142)
+++ stable/9/tools/regression/tls/ttls2/ttls2.c	Sun Dec 13 03:47:56 2015	(r292143)
@@ -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);
 }

Modified: stable/9/tools/regression/tls/ttls4/ttls4.c
==============================================================================
--- stable/9/tools/regression/tls/ttls4/ttls4.c	Sun Dec 13 03:45:57 2015	(r292142)
+++ stable/9/tools/regression/tls/ttls4/ttls4.c	Sun Dec 13 03:47:56 2015	(r292143)
@@ -9,11 +9,13 @@
 
 #include <stdio.h>
 #include <pthread.h>
+#include <stdlib.h>
 #include <unistd.h>
 
 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;


More information about the svn-src-stable-9 mailing list