summaryrefslogtreecommitdiffstats
path: root/tools/regression
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2015-12-13 03:45:57 +0000
committerngie <ngie@FreeBSD.org>2015-12-13 03:45:57 +0000
commite7a647fe8fd40eb273e9ce43da0e68f02ddb96cf (patch)
tree372292c86009af6384a659308b9763f4eef3d9f9 /tools/regression
parente640864a77bcd2ecd94e4566f6f297962d206dbb (diff)
downloadFreeBSD-src-e7a647fe8fd40eb273e9ce43da0e68f02ddb96cf.zip
FreeBSD-src-e7a647fe8fd40eb273e9ce43da0e68f02ddb96cf.tar.gz
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
Diffstat (limited to 'tools/regression')
-rw-r--r--tools/regression/tls/ttls2/ttls2.c10
-rw-r--r--tools/regression/tls/ttls4/ttls4.c7
2 files changed, 13 insertions, 4 deletions
diff --git a/tools/regression/tls/ttls2/ttls2.c b/tools/regression/tls/ttls2/ttls2.c
index f528e3d..15eb640 100644
--- a/tools/regression/tls/ttls2/ttls2.c
+++ b/tools/regression/tls/ttls2/ttls2.c
@@ -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);
}
diff --git a/tools/regression/tls/ttls4/ttls4.c b/tools/regression/tls/ttls4/ttls4.c
index d55e51b..914b220 100644
--- a/tools/regression/tls/ttls4/ttls4.c
+++ b/tools/regression/tls/ttls4/ttls4.c
@@ -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;
OpenPOWER on IntegriCloud