summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2014-03-11 07:42:55 +0000
committerguenther <guenther@openbsd.org>2014-03-11 07:42:55 +0000
commitc56d7ecca77470ffaf4f3f3f535eeb9ac8dc3ea7 (patch)
tree9e1f2fde652530f7f5fb878f2a0d0050abbe80d4
parentlint is dead (long live the lint!) (diff)
downloadwireguard-openbsd-c56d7ecca77470ffaf4f3f3f535eeb9ac8dc3ea7.tar.xz
wireguard-openbsd-c56d7ecca77470ffaf4f3f3f535eeb9ac8dc3ea7.zip
lint is dead (long live the lint!)
Declare play() and pl_main() as __dead, to solve the original problem
-rw-r--r--games/sail/extern.h6
-rw-r--r--games/sail/main.c5
-rw-r--r--games/sail/pl_main.c6
3 files changed, 7 insertions, 10 deletions
diff --git a/games/sail/extern.h b/games/sail/extern.h
index 106bb71ee4f..f6b2b1b60e4 100644
--- a/games/sail/extern.h
+++ b/games/sail/extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: extern.h,v 1.9 2013/08/29 20:22:19 naddy Exp $ */
+/* $OpenBSD: extern.h,v 1.10 2014/03/11 07:42:55 guenther Exp $ */
/* $NetBSD: extern.h,v 1.8 1998/09/13 15:27:30 hubertf Exp $ */
/*
@@ -373,7 +373,7 @@ void choke(int) __attribute__((__noreturn__));
void child(int);
/* pl_2.c */
-void play(void);
+__dead void play(void);
/* pl_3.c */
void acceptcombat(void);
@@ -424,7 +424,7 @@ void rightview(void);
void adjustview(void);
/* pl_main.c */
-int pl_main(void);
+__dead void pl_main(void);
void initialize(void);
/* sync.c */
diff --git a/games/sail/main.c b/games/sail/main.c
index 30a3f2cb2b3..1eb65f9564b 100644
--- a/games/sail/main.c
+++ b/games/sail/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.7 2013/08/29 20:22:20 naddy Exp $ */
+/* $OpenBSD: main.c,v 1.8 2014/03/11 07:42:55 guenther Exp $ */
/* $NetBSD: main.c,v 1.3 1995/04/22 10:37:01 cgd Exp $ */
/*
@@ -97,7 +97,7 @@ main(argc, argv)
mode = i;
switch (mode) {
case MODE_PLAYER:
- return pl_main();
+ pl_main();
case MODE_DRIVER:
return dr_main();
case MODE_LOGGER:
@@ -106,5 +106,4 @@ main(argc, argv)
warnx("Unknown mode %d", mode);
abort();
}
- /*NOTREACHED*/
}
diff --git a/games/sail/pl_main.c b/games/sail/pl_main.c
index 90d87765ffb..56b221ca2dc 100644
--- a/games/sail/pl_main.c
+++ b/games/sail/pl_main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pl_main.c,v 1.12 2009/10/27 23:59:27 deraadt Exp $ */
+/* $OpenBSD: pl_main.c,v 1.13 2014/03/11 07:42:55 guenther Exp $ */
/* $NetBSD: pl_main.c,v 1.5 1995/04/24 12:25:25 cgd Exp $ */
/*
@@ -38,13 +38,12 @@
#include <err.h>
/*ARGSUSED*/
-int
+void
pl_main()
{
initialize();
Msg("Aye aye, Sir");
play();
- return 0; /* for lint, play() never returns */
}
void
@@ -172,7 +171,6 @@ reprint:
switch (fork()) {
case 0:
longjmp(restart, MODE_DRIVER);
- /*NOTREACHED*/
case -1:
perror("fork");
leave(LEAVE_FORK);