diff options
author | 1996-12-21 22:23:36 +0000 | |
---|---|---|
committer | 1996-12-21 22:23:36 +0000 | |
commit | 07ea8d1515ffde9f9d310504e9c8852d6bf7074c (patch) | |
tree | b1b274b8fe893c81d243175ec21a32f3400dc0c3 /regress/lib/libc/regex/main.c | |
parent | $Id -> $OpenBSD (diff) | |
download | wireguard-openbsd-07ea8d1515ffde9f9d310504e9c8852d6bf7074c.tar.xz wireguard-openbsd-07ea8d1515ffde9f9d310504e9c8852d6bf7074c.zip |
-Wall madness.
Diffstat (limited to 'regress/lib/libc/regex/main.c')
-rw-r--r-- | regress/lib/libc/regex/main.c | 9 |
1 files changed, 6 insertions, 3 deletions
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®_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); |