summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
Diffstat (limited to 'regress')
-rw-r--r--regress/include/bitstring/bitstring_test.c3
-rw-r--r--regress/lib/libc/ieeefp/except/except.c1
-rw-r--r--regress/lib/libc/regex/debug.c2
-rw-r--r--regress/lib/libc/regex/main.c9
-rw-r--r--regress/lib/libc/setjmp/jmptest.c1
-rw-r--r--regress/sys/kern/execve/doexec.c2
6 files changed, 13 insertions, 5 deletions
diff --git a/regress/include/bitstring/bitstring_test.c b/regress/include/bitstring/bitstring_test.c
index d30bd8982af..3fa2511e59e 100644
--- a/regress/include/bitstring/bitstring_test.c
+++ b/regress/include/bitstring/bitstring_test.c
@@ -26,11 +26,12 @@
int TEST_LENGTH;
#define DECL_TEST_LENGTH 37 /* a mostly random number */
+int
main(int argc, char *argv[])
{
void clearbits();
void printbits();
- int b, i;
+ int i;
bitstr_t *bs;
bitstr_t bit_decl(bss, DECL_TEST_LENGTH);
diff --git a/regress/lib/libc/ieeefp/except/except.c b/regress/lib/libc/ieeefp/except/except.c
index 0ffdcdd468f..a2a107a788d 100644
--- a/regress/lib/libc/ieeefp/except/except.c
+++ b/regress/lib/libc/ieeefp/except/except.c
@@ -12,6 +12,7 @@ static volatile const double zero = 0.0;
static volatile const double huge = DBL_MAX;
static volatile const double tiny = DBL_MIN;
+int
main()
{
volatile double x;
diff --git a/regress/lib/libc/regex/debug.c b/regress/lib/libc/regex/debug.c
index 861f550611e..41cd4a557d6 100644
--- a/regress/lib/libc/regex/debug.c
+++ b/regress/lib/libc/regex/debug.c
@@ -218,7 +218,7 @@ FILE *d;
fprintf(d, ">");
break;
default:
- fprintf(d, "!%d(%d)!", OP(*s), opnd);
+ fprintf(d, "!%ld(%ld)!", (long)OP(*s), (long)opnd);
break;
}
if (!done)
diff --git a/regress/lib/libc/regex/main.c b/regress/lib/libc/regex/main.c
index 8d88a8b9b81..add5e8be103 100644
--- a/regress/lib/libc/regex/main.c
+++ b/regress/lib/libc/regex/main.c
@@ -1,10 +1,13 @@
+/* $OpenBSD: main.c,v 1.2 1996/12/21 22:23:42 millert Exp $ */
/* $NetBSD: main.c,v 1.2 1995/04/20 22:39:51 cgd Exp $ */
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <regex.h>
#include <assert.h>
+#include <unistd.h>
#include "main.ih"
@@ -25,6 +28,7 @@ extern void regprint();
/*
- main - do the simple case, hand off to regress() for regression
*/
+int
main(argc, argv)
int argc;
char *argv[];
@@ -102,10 +106,10 @@ char *argv[];
exit(status);
}
if (!(copts&REG_NOSUB)) {
- len = (int)(subs[0].rm_eo - subs[0].rm_so);
+ len = (size_t)(subs[0].rm_eo - subs[0].rm_so);
if (subs[0].rm_so != -1) {
if (len != 0)
- printf("match `%.*s'\n", len,
+ printf("match `%.*s'\n", (int)len,
argv[optind] + subs[0].rm_so);
else
printf("match `'@%.1s\n",
@@ -501,7 +505,6 @@ efind(name)
char *name;
{
static char efbuf[100];
- size_t n;
regex_t re;
sprintf(efbuf, "REG_%s", name);
diff --git a/regress/lib/libc/setjmp/jmptest.c b/regress/lib/libc/setjmp/jmptest.c
index f2cecc9178e..c306979b3d2 100644
--- a/regress/lib/libc/setjmp/jmptest.c
+++ b/regress/lib/libc/setjmp/jmptest.c
@@ -32,6 +32,7 @@
*/
#include <sys/types.h>
+#include <err.h>
#include <setjmp.h>
#include <signal.h>
#include <stdio.h>
diff --git a/regress/sys/kern/execve/doexec.c b/regress/sys/kern/execve/doexec.c
index 6ea31d5a636..1f16572979d 100644
--- a/regress/sys/kern/execve/doexec.c
+++ b/regress/sys/kern/execve/doexec.c
@@ -49,4 +49,6 @@ main(argc, argv)
printf("%s\n", strerror(errno));
exit(1);
}
+
+ exit(0);
}