svn commit: r292142 - in stable/10/tools/regression/tls: ttls2 ttls4
Garrett Cooper
ngie at FreeBSD.org
Sun Dec 13 03:45:59 UTC 2015
Author: ngie
Date: Sun Dec 13 03:45:57 2015
New Revision: 292142
URL: https://svnweb.freebsd.org/changeset/base/292142
Log:
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/10/tools/regression/tls/ttls2/ttls2.c
stable/10/tools/regression/tls/ttls4/ttls4.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/tools/regression/tls/ttls2/ttls2.c
==============================================================================
--- stable/10/tools/regression/tls/ttls2/ttls2.c Sun Dec 13 03:41:50 2015 (r292141)
+++ stable/10/tools/regression/tls/ttls2/ttls2.c Sun Dec 13 03:45:57 2015 (r292142)
@@ -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/10/tools/regression/tls/ttls4/ttls4.c
==============================================================================
--- stable/10/tools/regression/tls/ttls4/ttls4.c Sun Dec 13 03:41:50 2015 (r292141)
+++ stable/10/tools/regression/tls/ttls4/ttls4.c Sun Dec 13 03:45:57 2015 (r292142)
@@ -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-10
mailing list