Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/games Add `__noreturn__' and `__unused__' attributes where a...



details:   https://anonhg.NetBSD.org/src/rev/ca43056e468a
branches:  trunk
changeset: 476176:ca43056e468a
user:      jsm <jsm%NetBSD.org@localhost>
date:      Wed Sep 08 21:45:25 1999 +0000

description:
Add `__noreturn__' and `__unused__' attributes where appropriate to
the games.

This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).

Most noreturn attributes were previously added in bin/6144, with some
others that were missed then in bin/8082.  Previous `unused'
attributes were covered in bin/6557, bin/8058 and other PRs (all these
PRs have already been handled and closed).

diffstat:

 games/backgammon/common_source/subs.c |   6 +++---
 games/battlestar/com6.c               |   6 +++---
 games/battlestar/fly.c                |   8 ++++----
 games/boggle/boggle/mach.c            |  10 +++++-----
 games/canfield/canfield/canfield.c    |   8 ++++----
 games/cribbage/io.c                   |   6 +++---
 games/cribbage/score.c                |   6 +++---
 games/fortune/fortune/fortune.c       |  10 +++++++---
 games/gomoku/main.c                   |   6 +++---
 games/gomoku/pickmove.c               |   6 +++---
 games/hangman/hangman.h               |   4 ++--
 games/hangman/main.c                  |   6 +++---
 games/mille/mille.c                   |   6 +++---
 games/mille/print.c                   |  10 +++++++---
 games/monop/monop.c                   |   6 +++---
 games/phantasia/io.c                  |   4 ++--
 games/phantasia/phantglobs.h          |   4 ++--
 games/random/random.c                 |   6 +++---
 games/robots/main.c                   |   6 +++---
 games/rogue/init.c                    |  10 +++++-----
 games/rogue/rogue.h                   |   6 +++---
 games/sail/extern.h                   |   4 ++--
 games/sail/pl_1.c                     |   8 ++++----
 games/sail/pl_7.c                     |   6 +++---
 games/snake/snake/snake.c             |   6 +++---
 games/snake/snake/snake.h             |   4 ++--
 games/tetris/screen.c                 |   4 ++--
 games/tetris/tetris.c                 |   4 ++--
 games/trek/abandon.c                  |   6 +++---
 games/trek/capture.c                  |   6 +++---
 games/trek/cgetc.c                    |   6 +++---
 games/trek/computer.c                 |   6 +++---
 games/trek/dcrept.c                   |   6 +++---
 games/trek/destruct.c                 |   6 +++---
 games/trek/dock.c                     |   8 ++++----
 games/trek/dumpgame.c                 |   6 +++---
 games/trek/help.c                     |   6 +++---
 games/trek/impulse.c                  |   6 +++---
 games/trek/lrscan.c                   |   6 +++---
 games/trek/phaser.c                   |   6 +++---
 games/trek/play.c                     |   6 +++---
 games/trek/rest.c                     |   6 +++---
 games/trek/setwarp.c                  |   6 +++---
 games/trek/torped.c                   |   6 +++---
 games/trek/trek.h                     |  10 +++++-----
 games/trek/visual.c                   |   6 +++---
 games/worm/worm.c                     |   6 +++---
 47 files changed, 152 insertions(+), 144 deletions(-)

diffs (truncated from 1294 to 300 lines):

diff -r d2218ad78a4f -r ca43056e468a games/backgammon/common_source/subs.c
--- a/games/backgammon/common_source/subs.c     Wed Sep 08 21:42:44 1999 +0000
+++ b/games/backgammon/common_source/subs.c     Wed Sep 08 21:45:25 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subs.c,v 1.11 1999/07/26 20:50:44 hubertf Exp $        */
+/*     $NetBSD: subs.c,v 1.12 1999/09/08 21:45:25 jsm Exp $    */
 
 /*
  * Copyright (c) 1980, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)subs.c     8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: subs.c,v 1.11 1999/07/26 20:50:44 hubertf Exp $");
+__RCSID("$NetBSD: subs.c,v 1.12 1999/09/08 21:45:25 jsm Exp $");
 #endif
 #endif /* not lint */
 
@@ -446,7 +446,7 @@
 
 void
 getout(dummy)
-       int     dummy;
+       int     dummy __attribute__((__unused__));
 {
        /* go to bottom of screen */
        if (tflag) {
diff -r d2218ad78a4f -r ca43056e468a games/battlestar/com6.c
--- a/games/battlestar/com6.c   Wed Sep 08 21:42:44 1999 +0000
+++ b/games/battlestar/com6.c   Wed Sep 08 21:45:25 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: com6.c,v 1.11 1999/07/21 03:56:53 hubertf Exp $        */
+/*     $NetBSD: com6.c,v 1.12 1999/09/08 21:45:25 jsm Exp $    */
 
 /*
  * Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)com6.c     8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: com6.c,v 1.11 1999/07/21 03:56:53 hubertf Exp $");
+__RCSID("$NetBSD: com6.c,v 1.12 1999/09/08 21:45:25 jsm Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -92,7 +92,7 @@
 
 void
 diesig(dummy)
-       int     dummy;
+       int     dummy __attribute__((__unused__));
 {
        die();
 }
diff -r d2218ad78a4f -r ca43056e468a games/battlestar/fly.c
--- a/games/battlestar/fly.c    Wed Sep 08 21:42:44 1999 +0000
+++ b/games/battlestar/fly.c    Wed Sep 08 21:45:25 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fly.c,v 1.7 1999/04/18 03:30:12 simonb Exp $   */
+/*     $NetBSD: fly.c,v 1.8 1999/09/08 21:45:25 jsm Exp $      */
 
 /*
  * Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)fly.c      8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: fly.c,v 1.7 1999/04/18 03:30:12 simonb Exp $");
+__RCSID("$NetBSD: fly.c,v 1.8 1999/09/08 21:45:25 jsm Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -59,7 +59,7 @@
 
 void
 succumb(dummy)
-       int     dummy;
+       int     dummy __attribute__((__unused__));
 {
        if (oldsig == SIG_DFL) {
                endfly();
@@ -245,7 +245,7 @@
 
 void
 moveenemy(dummy)
-       int     dummy;
+       int     dummy __attribute__((__unused__));
 {
        double  d;
        int     oldr, oldc;
diff -r d2218ad78a4f -r ca43056e468a games/boggle/boggle/mach.c
--- a/games/boggle/boggle/mach.c        Wed Sep 08 21:42:44 1999 +0000
+++ b/games/boggle/boggle/mach.c        Wed Sep 08 21:45:25 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mach.c,v 1.9 1999/09/08 21:17:44 jsm Exp $     */
+/*     $NetBSD: mach.c,v 1.10 1999/09/08 21:45:26 jsm Exp $    */
 
 /*-
  * Copyright (c) 1993
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = "@(#)mach.c     8.1 (Berkeley) 6/11/93";
 #else
-__RCSID("$NetBSD: mach.c,v 1.9 1999/09/08 21:17:44 jsm Exp $");
+__RCSID("$NetBSD: mach.c,v 1.10 1999/09/08 21:45:26 jsm Exp $");
 #endif
 #endif /* not lint */
 
@@ -598,7 +598,7 @@
 
 static void
 stop_catcher(signo)
-       int signo;
+       int signo __attribute__((__unused__));
 {
        sigset_t sigset, osigset;
 
@@ -619,7 +619,7 @@
  
 static void
 cont_catcher(signo)
-       int signo;
+       int signo __attribute__((__unused__));
 {
        noecho();
        raw();
@@ -635,7 +635,7 @@
  */
 static void
 winch_catcher(signo)
-       int signo;
+       int signo __attribute__((__unused__));
 {
        struct winsize win;
 
diff -r d2218ad78a4f -r ca43056e468a games/canfield/canfield/canfield.c
--- a/games/canfield/canfield/canfield.c        Wed Sep 08 21:42:44 1999 +0000
+++ b/games/canfield/canfield/canfield.c        Wed Sep 08 21:45:25 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: canfield.c,v 1.12 1999/09/08 21:17:46 jsm Exp $        */
+/*     $NetBSD: canfield.c,v 1.13 1999/09/08 21:45:26 jsm Exp $        */
 
 /*
  * Copyright (c) 1980, 1993
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)canfield.c 8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: canfield.c,v 1.12 1999/09/08 21:17:46 jsm Exp $");
+__RCSID("$NetBSD: canfield.c,v 1.13 1999/09/08 21:45:26 jsm Exp $");
 #endif
 #endif /* not lint */
 
@@ -1742,7 +1742,7 @@
  */
 void
 cleanup(dummy)
-       int dummy;
+       int dummy __attribute__((__unused__));
 {
 
        total.thinktime += 1;
@@ -1766,7 +1766,7 @@
  */
 void
 askquit(dummy)
-       int dummy;
+       int dummy __attribute__((__unused__));
 {
        move(msgrow, msgcol);
        printw("Really wish to quit?    ");
diff -r d2218ad78a4f -r ca43056e468a games/cribbage/io.c
--- a/games/cribbage/io.c       Wed Sep 08 21:42:44 1999 +0000
+++ b/games/cribbage/io.c       Wed Sep 08 21:45:25 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: io.c,v 1.11 1999/09/08 21:17:47 jsm Exp $      */
+/*     $NetBSD: io.c,v 1.12 1999/09/08 21:45:26 jsm Exp $      */
 
 /*-
  * Copyright (c) 1980, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)io.c       8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: io.c,v 1.11 1999/09/08 21:17:47 jsm Exp $");
+__RCSID("$NetBSD: io.c,v 1.12 1999/09/08 21:45:26 jsm Exp $");
 #endif
 #endif /* not lint */
 
@@ -612,7 +612,7 @@
 
 void
 rint(signo)
-       int signo;
+       int signo __attribute__((__unused__));
 {
        bye();
        exit(1);
diff -r d2218ad78a4f -r ca43056e468a games/cribbage/score.c
--- a/games/cribbage/score.c    Wed Sep 08 21:42:44 1999 +0000
+++ b/games/cribbage/score.c    Wed Sep 08 21:45:25 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: score.c,v 1.7 1999/09/08 21:17:47 jsm Exp $    */
+/*     $NetBSD: score.c,v 1.8 1999/09/08 21:45:26 jsm Exp $    */
 
 /*-
  * Copyright (c) 1980, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)score.c    8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: score.c,v 1.7 1999/09/08 21:17:47 jsm Exp $");
+__RCSID("$NetBSD: score.c,v 1.8 1999/09/08 21:45:26 jsm Exp $");
 #endif
 #endif /* not lint */
 
@@ -354,7 +354,7 @@
 int
 adjust(cb, tnv)
        const CARD cb[];
-       CARD tnv;
+       CARD tnv __attribute__((__unused__));
 {
        long scr;
        int i, c0, c1;
diff -r d2218ad78a4f -r ca43056e468a games/fortune/fortune/fortune.c
--- a/games/fortune/fortune/fortune.c   Wed Sep 08 21:42:44 1999 +0000
+++ b/games/fortune/fortune/fortune.c   Wed Sep 08 21:45:25 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fortune.c,v 1.16 1999/09/08 21:17:48 jsm Exp $ */
+/*     $NetBSD: fortune.c,v 1.17 1999/09/08 21:45:27 jsm Exp $ */
 
 /*-
  * Copyright (c) 1986, 1993
@@ -46,7 +46,7 @@
 #if 0
 static char sccsid[] = "@(#)fortune.c  8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: fortune.c,v 1.16 1999/09/08 21:17:48 jsm Exp $");
+__RCSID("$NetBSD: fortune.c,v 1.17 1999/09/08 21:45:27 jsm Exp $");
 #endif
 #endif /* not lint */
 
@@ -757,7 +757,11 @@
 int
 is_fortfile(file, datp, posp, check_for_offend)
        const char      *file;
-       char            **datp, **posp;
+       char            **datp, **posp
+# ifndef OK_TO_WRITE_DISK
+       __attribute__((__unused__))
+# endif
+       ;
        int     check_for_offend;
 {
        int     i;
diff -r d2218ad78a4f -r ca43056e468a games/gomoku/main.c
--- a/games/gomoku/main.c       Wed Sep 08 21:42:44 1999 +0000
+++ b/games/gomoku/main.c       Wed Sep 08 21:45:25 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.6 1999/09/08 21:17:49 jsm Exp $     */
+/*     $NetBSD: main.c,v 1.7 1999/09/08 21:45:27 jsm Exp $     */
 
 /*
  * Copyright (c) 1994
@@ -46,7 +46,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.4 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: main.c,v 1.6 1999/09/08 21:17:49 jsm Exp $");
+__RCSID("$NetBSD: main.c,v 1.7 1999/09/08 21:45:27 jsm Exp $");
 #endif
 #endif /* not lint */
 
@@ -533,7 +533,7 @@
 
 void
 quitsig(dummy)
-       int dummy;
+       int dummy __attribute__((__unused__));
 {
        quit();
 }
diff -r d2218ad78a4f -r ca43056e468a games/gomoku/pickmove.c
--- a/games/gomoku/pickmove.c   Wed Sep 08 21:42:44 1999 +0000
+++ b/games/gomoku/pickmove.c   Wed Sep 08 21:45:25 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pickmove.c,v 1.6 1999/09/08 21:17:49 jsm Exp $ */
+/*     $NetBSD: pickmove.c,v 1.7 1999/09/08 21:45:27 jsm Exp $ */
 
 /*
  * Copyright (c) 1994
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = "@(#)pickmove.c 8.2 (Berkeley) 5/3/95";
 #else
-__RCSID("$NetBSD: pickmove.c,v 1.6 1999/09/08 21:17:49 jsm Exp $");
+__RCSID("$NetBSD: pickmove.c,v 1.7 1999/09/08 21:45:27 jsm Exp $");
 #endif
 #endif /* not lint */



Home | Main Index | Thread Index | Old Index