summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2003-12-07 17:34:52 +0000
committerdes <des@FreeBSD.org>2003-12-07 17:34:52 +0000
commit560fd10b553dd62fe68d6e57da0e710848989746 (patch)
tree81a5d352e7adb785ec5b62d8f0fad5110577dcc2
parent058c4309169940e49da486bb355e7ac155f89349 (diff)
downloadFreeBSD-src-560fd10b553dd62fe68d6e57da0e710848989746.zip
FreeBSD-src-560fd10b553dd62fe68d6e57da0e710848989746.tar.gz
Use WARNS level 2 instead of setting CFLAGS explicitly to -Wall.
-rw-r--r--games/fortune/strfile/Makefile2
-rw-r--r--games/fortune/strfile/strfile.c42
2 files changed, 22 insertions, 22 deletions
diff --git a/games/fortune/strfile/Makefile b/games/fortune/strfile/Makefile
index e8d3fac..2b39220 100644
--- a/games/fortune/strfile/Makefile
+++ b/games/fortune/strfile/Makefile
@@ -4,6 +4,6 @@
PROG= strfile
MAN= strfile.8
MLINKS= strfile.8 unstr.8
-CFLAGS+= -Wall
+WARNS?= 2
.include <bsd.prog.mk>
diff --git a/games/fortune/strfile/strfile.c b/games/fortune/strfile/strfile.c
index a9ccbb6..acc7720 100644
--- a/games/fortune/strfile/strfile.c
+++ b/games/fortune/strfile/strfile.c
@@ -105,37 +105,37 @@ __FBSDID("$FreeBSD$");
#endif
typedef struct {
- char first;
+ int first;
long pos;
} STR;
-char *Infile = NULL, /* input file name */
- Outfile[MAXPATHLEN] = "", /* output file name */
- Delimch = '%'; /* delimiting character */
+static char *Infile = NULL, /* input file name */
+ Outfile[MAXPATHLEN] = "", /* output file name */
+ Delimch = '%'; /* delimiting character */
-int Cflag = FALSE; /* embedded comments */
-int Sflag = FALSE; /* silent run flag */
-int Oflag = FALSE; /* ordering flag */
-int Iflag = FALSE; /* ignore case flag */
-int Rflag = FALSE; /* randomize order flag */
-int Xflag = FALSE; /* set rotated bit */
-long Num_pts = 0; /* number of pointers/strings */
+static int Cflag = FALSE; /* embedded comments */
+static int Sflag = FALSE; /* silent run flag */
+static int Oflag = FALSE; /* ordering flag */
+static int Iflag = FALSE; /* ignore case flag */
+static int Rflag = FALSE; /* randomize order flag */
+static int Xflag = FALSE; /* set rotated bit */
+static long Num_pts = 0; /* number of pointers/strings */
-long *Seekpts;
+static long *Seekpts;
-FILE *Sort_1, *Sort_2; /* pointers for sorting */
+static FILE *Sort_1, *Sort_2; /* pointers for sorting */
-STRFILE Tbl; /* statistics table */
+static STRFILE Tbl; /* statistics table */
-STR *Firstch; /* first chars of each string */
+static STR *Firstch; /* first chars of each string */
-void add_offset(FILE *, long);
-int cmp_str(const void *, const void *);
+static void add_offset(FILE *, long);
+static int cmp_str(const void *, const void *);
static int stable_collate_range_cmp(int, int);
-void do_order(void);
-void getargs(int, char **);
-void randomize(void);
-void usage(void);
+static void do_order(void);
+static void getargs(int, char **);
+static void randomize(void);
+static void usage(void);
/*
* main:
OpenPOWER on IntegriCloud