Fix -Wall warnings.

Yes I have better things to do, but just now I'm waiting...
This commit is contained in:
Poul-Henning Kamp 1995-02-23 07:05:01 +00:00
parent 5dec1760ed
commit 38994f93ce

View File

@ -44,10 +44,14 @@ static char sccsid[] = "@(#)swapon.c 8.1 (Berkeley) 6/5/93";
#include <fstab.h> #include <fstab.h>
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
main(argc, argv) void usage __P((void));
int argc; int add __P((char *name, int ignoreebusy));
char **argv;
int
main(int argc, char **argv)
{ {
extern char *optarg; extern char *optarg;
extern int optind; extern int optind;
@ -69,7 +73,7 @@ main(argc, argv)
stat = 0; stat = 0;
if (doall) if (doall)
while (fsp = getfsent()) { while ((fsp = getfsent()) != NULL) {
if (strcmp(fsp->fs_type, FSTAB_SW)) if (strcmp(fsp->fs_type, FSTAB_SW))
continue; continue;
if (add(fsp->fs_spec, 1)) if (add(fsp->fs_spec, 1))
@ -85,9 +89,8 @@ main(argc, argv)
exit(stat); exit(stat);
} }
add(name, ignoreebusy) int
char *name; add(char *name, int ignoreebusy)
int ignoreebusy;
{ {
extern int errno; extern int errno;
@ -113,6 +116,7 @@ add(name, ignoreebusy)
return(0); return(0);
} }
void
usage() usage()
{ {
fprintf(stderr, "usage: swapon [-a] [special_file ...]\n"); fprintf(stderr, "usage: swapon [-a] [special_file ...]\n");