diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2003-06-25 03:39:24 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2003-06-25 03:39:24 +0000 |
commit | 7140f4a17ddb1505a5bbbf6fc46c2436474b27a4 (patch) | |
tree | 59fb58906e034cf9c82eb3c6cdca0a64058d33df /usr.bin | |
parent | 702baeac5f802cd5a4d2caf5464d2853bd9e5632 (diff) |
-Wstrict-prototypes
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/diff/diffdir.c | 15 | ||||
-rw-r--r-- | usr.bin/diff/diffreg.c | 3 |
2 files changed, 11 insertions, 7 deletions
diff --git a/usr.bin/diff/diffdir.c b/usr.bin/diff/diffdir.c index 6e81615bf92..1ae9b4faf0c 100644 --- a/usr.bin/diff/diffdir.c +++ b/usr.bin/diff/diffdir.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diffdir.c,v 1.7 2003/06/25 03:37:32 deraadt Exp $ */ +/* $OpenBSD: diffdir.c,v 1.8 2003/06/25 03:39:23 tedu Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. @@ -37,6 +37,7 @@ #include <sys/types.h> #include <sys/wait.h> +#include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <unistd.h> @@ -81,6 +82,8 @@ static void setfile(char **fpp, char **epp, char *file); static int useless(char *); static void only(struct dir *dp, int which); static void scanpr(struct dir *, int, char *, char *, char *, char *, char *); +static int entcmp(const void *, const void *); + void diffdir(char **argv) @@ -218,8 +221,6 @@ only(struct dir *dp, int which) printf("Only in %.*s: %s\n", (int)(efile - file - 1), file, dp->d_entry); } -int entcmp(); - struct dir * setupdir(char *cp) { @@ -254,9 +255,13 @@ setupdir(char *cp) return (dp); } -int -entcmp(struct dir *d1, struct dir *d2) +static int +entcmp(const void *v1, const void *v2) { + const struct dir *d1, *d2; + + d1 = v1; + d2 = v2; return (strcmp(d1->d_entry, d2->d_entry)); } diff --git a/usr.bin/diff/diffreg.c b/usr.bin/diff/diffreg.c index c3f814e46f0..ee001439391 100644 --- a/usr.bin/diff/diffreg.c +++ b/usr.bin/diff/diffreg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diffreg.c,v 1.6 2003/06/25 03:38:34 deraadt Exp $ */ +/* $OpenBSD: diffreg.c,v 1.7 2003/06/25 03:39:23 tedu Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. @@ -118,7 +118,6 @@ static char const sccsid[] = "@(#)diffreg.c 4.21 4/6/90"; #define prints(s) fputs(s,stdout) FILE *input[2]; -FILE *fopen(); struct cand { int x; |