summaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authorbillf <billf@FreeBSD.org>2000-07-03 22:38:19 +0000
committerbillf <billf@FreeBSD.org>2000-07-03 22:38:19 +0000
commitfb6a5b5ebd6e14443bab177f47d2c61309bd6e0c (patch)
treeaa9eea26ddcf36f8a693aa5309a4364669e87a0c /games
parentb76d84240a240a4e7c75f2b79fbf3a3043ae6fbe (diff)
downloadFreeBSD-src-fb6a5b5ebd6e14443bab177f47d2c61309bd6e0c.zip
FreeBSD-src-fb6a5b5ebd6e14443bab177f47d2c61309bd6e0c.tar.gz
"Fix" warnings.
Diffstat (limited to 'games')
-rw-r--r--games/fortune/strfile/strfile.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/games/fortune/strfile/strfile.c b/games/fortune/strfile/strfile.c
index 28a0e25..0dda040 100644
--- a/games/fortune/strfile/strfile.c
+++ b/games/fortune/strfile/strfile.c
@@ -131,8 +131,13 @@ STRFILE Tbl; /* statistics table */
STR *Firstch; /* first chars of each string */
-void getargs(), add_offset(), do_order(), randomize(), usage();
-int cmp_str();
+void add_offset __P((FILE *, long));
+int cmp_str __P((const void *, const void *));
+static int collate_range_cmp __P((int, int));
+void do_order __P((void));
+void getargs __P((int, char **));
+void randomize __P((void));
+void usage __P((void));
/*
* main:
@@ -264,8 +269,6 @@ void getargs(argc, argv)
int argc;
char **argv;
{
- extern char *optarg;
- extern int optind;
int ch;
while ((ch = getopt(argc, argv, "Cc:iorsx")) != EOF)
@@ -387,9 +390,10 @@ static int collate_range_cmp (c1, c2)
* cmp_str:
* Compare two strings in the file
*/
-int cmp_str(p1, p2)
-STR *p1, *p2;
+int cmp_str(s1, s2)
+const void *s1, *s2;
{
+ const STR *p1, *p2;
int c1, c2;
int n1, n2;
int r;
@@ -397,6 +401,9 @@ STR *p1, *p2;
# define SET_N(nf,ch) (nf = (ch == '\n'))
# define IS_END(ch,nf) (ch == EOF || (ch == (unsigned char) Delimch && nf))
+ p1 = (const STR *)s1;
+ p2 = (const STR *)s2;
+
c1 = (unsigned char) p1->first;
c2 = (unsigned char) p2->first;
if ((r = collate_range_cmp(c1, c2)) != 0)
OpenPOWER on IntegriCloud