Skip to content

Commit dd397c8

Browse files
hubertfhubertf
hubertf
authored and
hubertf
committed
remove unused function return values (PR#6079 by Joseph Myers <jsm28@cam.ac.uk>)
1 parent dd6e9d3 commit dd397c8

File tree

4 files changed

+22
-31
lines changed

4 files changed

+22
-31
lines changed

games/adventure/done.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: done.c,v 1.5 1997/10/11 01:53:23 lukem Exp $ */
1+
/* $NetBSD: done.c,v 1.6 1998/09/13 15:21:36 hubertf Exp $ */
22

33
/*-
44
* Copyright (c) 1991, 1993
@@ -43,7 +43,7 @@
4343
#if 0
4444
static char sccsid[] = "@(#)done.c 8.1 (Berkeley) 5/31/93";
4545
#else
46-
__RCSID("$NetBSD: done.c,v 1.5 1997/10/11 01:53:23 lukem Exp $");
46+
__RCSID("$NetBSD: done.c,v 1.6 1998/09/13 15:21:36 hubertf Exp $");
4747
#endif
4848
#endif /* not lint */
4949

@@ -139,7 +139,7 @@ done(entry) /* entry=1 means goto 13000 */ /* game is over */
139139
}
140140

141141

142-
int
142+
void
143143
die(entry) /* label 90 */
144144
int entry;
145145
{
@@ -171,5 +171,4 @@ die(entry) /* label 90 */
171171
}
172172
loc = 3;
173173
oldloc = loc;
174-
return (2000);
175174
}

games/adventure/extern.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: extern.h,v 1.8 1998/09/13 00:07:24 hubertf Exp $ */
1+
/* $NetBSD: extern.h,v 1.9 1998/09/13 15:21:37 hubertf Exp $ */
22

33
/*
44
* Copyright (c) 1997 Christos Zoulas. All rights reserved.
@@ -37,8 +37,8 @@ unsigned long crc __P((const char *, int));
3737

3838
/* done.c */
3939
int score __P((void));
40-
void done __P((int));
41-
int die __P((int));
40+
void done __P((int)) __attribute__((__noreturn__));
41+
void die __P((int));
4242

4343
/* init.c */
4444
void init __P((void));
@@ -90,9 +90,9 @@ int march __P((void));
9090
int mback __P((void));
9191
int specials __P((void));
9292
int trbridge __P((void));
93-
int badmove __P((void));
94-
int bug __P((int)) __attribute__((__noreturn__));
95-
int checkhints __P((void));
93+
void badmove __P((void));
94+
void bug __P((int)) __attribute__((__noreturn__));
95+
void checkhints __P((void));
9696
int trsay __P((void));
9797
int trtake __P((void));
9898
int dropper __P((void));
@@ -102,8 +102,8 @@ int trkill __P((void));
102102
int trtoss __P((void));
103103
int trfeed __P((void));
104104
int trfill __P((void));
105-
int closing __P((void));
106-
int caveclose __P((void));
105+
void closing __P((void));
106+
void caveclose __P((void));
107107

108108
/* vocab.c */
109109
void dstroy __P((int));

games/adventure/main.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: main.c,v 1.10 1998/09/11 14:51:18 hubertf Exp $ */
1+
/* $NetBSD: main.c,v 1.11 1998/09/13 15:21:37 hubertf Exp $ */
22

33
/*-
44
* Copyright (c) 1991, 1993
@@ -48,7 +48,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 1993\n\
4848
#if 0
4949
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/2/93";
5050
#else
51-
__RCSID("$NetBSD: main.c,v 1.10 1998/09/11 14:51:18 hubertf Exp $");
51+
__RCSID("$NetBSD: main.c,v 1.11 1998/09/13 15:21:37 hubertf Exp $");
5252
#endif
5353
#endif /* not lint */
5454

@@ -286,12 +286,8 @@ l2630: i = vocab(wd1, -1, 0);
286286
case 2:
287287
continue; /* i.e. goto l2 */
288288
case 99:
289-
switch (die(99)) {
290-
case 2000:
291-
goto l2000;
292-
default:
293-
bug(111);
294-
}
289+
die(99);
290+
goto l2000;
295291
default:
296292
bug(110);
297293
}

games/adventure/subr.c

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: subr.c,v 1.6 1998/08/24 22:07:37 hubertf Exp $ */
1+
/* $NetBSD: subr.c,v 1.7 1998/09/13 15:21:37 hubertf Exp $ */
22

33
/*-
44
* Copyright (c) 1991, 1993
@@ -43,7 +43,7 @@
4343
#if 0
4444
static char sccsid[] = "@(#)subr.c 8.1 (Berkeley) 5/31/93";
4545
#else
46-
__RCSID("$NetBSD: subr.c,v 1.6 1998/08/24 22:07:37 hubertf Exp $");
46+
__RCSID("$NetBSD: subr.c,v 1.7 1998/09/13 15:21:37 hubertf Exp $");
4747
#endif
4848
#endif /* not lint */
4949

@@ -474,7 +474,7 @@ trbridge()
474474
}
475475

476476

477-
int
477+
void
478478
badmove()
479479
{ /* 20 */
480480
spk = 12;
@@ -493,10 +493,9 @@ badmove()
493493
if (k == 17)
494494
spk = 80;
495495
rspeak(spk);
496-
return (2);
497496
}
498497

499-
int
498+
void
500499
bug(n)
501500
int n;
502501
{
@@ -505,7 +504,7 @@ bug(n)
505504
}
506505

507506

508-
int
507+
void
509508
checkhints()
510509
{ /* 2600 &c */
511510
int hint;
@@ -552,7 +551,6 @@ l40010: hintlc[hint] = 0;
552551
hinted[hint] = yes(175, hints[hint][4], 54);
553552
l40020: hintlc[hint] = 0;
554553
}
555-
return 0;
556554
}
557555

558556

@@ -1001,7 +999,7 @@ trfill()
1001999
}
10021000

10031001

1004-
int
1002+
void
10051003
closing()
10061004
{ /* 10000 */
10071005
int i;
@@ -1025,11 +1023,10 @@ closing()
10251023
rspeak(129);
10261024
clock1 = -1;
10271025
closng = TRUE;
1028-
return (19999);
10291026
}
10301027

10311028

1032-
int
1029+
void
10331030
caveclose()
10341031
{ /* 11000 */
10351032
int i;
@@ -1058,5 +1055,4 @@ caveclose()
10581055
dstroy(i);
10591056
rspeak(132);
10601057
closed = TRUE;
1061-
return (2);
10621058
}

0 commit comments

Comments
 (0)