Source-Changes-HG archive

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

[src/trunk]: src/games/rogue Make "rogue" build with "WARNS=2". The necessary...



details:   https://anonhg.NetBSD.org/src/rev/2c663baf5276
branches:  trunk
changeset: 533680:2c663baf5276
user:      tron <tron%NetBSD.org@localhost>
date:      Sun Jul 07 09:35:07 2002 +0000

description:
Make "rogue" build with "WARNS=2". The necessary patches were supplied
by David A. Holland in PR bin/17498.

diffstat:

 games/rogue/Makefile    |   3 ++-
 games/rogue/hit.c       |  12 ++++++------
 games/rogue/inventory.c |  10 +++++-----
 games/rogue/score.c     |   8 ++++----
 4 files changed, 17 insertions(+), 16 deletions(-)

diffs (130 lines):

diff -r 1c03218ff3ec -r 2c663baf5276 games/rogue/Makefile
--- a/games/rogue/Makefile      Sun Jul 07 07:37:50 2002 +0000
+++ b/games/rogue/Makefile      Sun Jul 07 09:35:07 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.14 1999/09/13 17:14:07 jsm Exp $
+#      $NetBSD: Makefile,v 1.15 2002/07/07 09:35:07 tron Exp $
 #      @(#)Makefile    8.1 (Berkeley) 5/31/93
 
 PROG=  rogue
@@ -11,6 +11,7 @@
 HIDEGAME=hidegame
 SETGIDGAME=yes
 MAN=   rogue.6
+WARNS= 2
 
 .if make(install)
 SUBDIR+=USD.doc
diff -r 1c03218ff3ec -r 2c663baf5276 games/rogue/hit.c
--- a/games/rogue/hit.c Sun Jul 07 07:37:50 2002 +0000
+++ b/games/rogue/hit.c Sun Jul 07 09:35:07 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hit.c,v 1.5 1998/11/10 13:01:31 hubertf Exp $  */
+/*     $NetBSD: hit.c,v 1.6 2002/07/07 09:35:07 tron Exp $     */
 
 /*
  * Copyright (c) 1988, 1993
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = "@(#)hit.c      8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: hit.c,v 1.5 1998/11/10 13:01:31 hubertf Exp $");
+__RCSID("$NetBSD: hit.c,v 1.6 2002/07/07 09:35:07 tron Exp $");
 #endif
 #endif /* not lint */
 
@@ -213,17 +213,17 @@
        const object *obj;
 {
        char new_damage[12];
-       int to_hit, damage;
+       int tmp_to_hit, tmp_damage;
        int i = 0;
 
        if ((!obj) || (obj->what_is != WEAPON)) {
                return(-1);
        }
-       to_hit = get_number(obj->damage) + obj->hit_enchant;
+       tmp_to_hit = get_number(obj->damage) + obj->hit_enchant;
        while (obj->damage[i++] != 'd') ;
-       damage = get_number(obj->damage + i) + obj->d_enchant;
+       tmp_damage = get_number(obj->damage + i) + obj->d_enchant;
 
-       sprintf(new_damage, "%dd%d", to_hit, damage);
+       sprintf(new_damage, "%dd%d", tmp_to_hit, tmp_damage);
 
        return(get_damage(new_damage, 1));
 }
diff -r 1c03218ff3ec -r 2c663baf5276 games/rogue/inventory.c
--- a/games/rogue/inventory.c   Sun Jul 07 07:37:50 2002 +0000
+++ b/games/rogue/inventory.c   Sun Jul 07 09:35:07 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: inventory.c,v 1.6 1998/11/10 13:01:32 hubertf Exp $    */
+/*     $NetBSD: inventory.c,v 1.7 2002/07/07 09:35:08 tron Exp $       */
 
 /*
  * Copyright (c) 1988, 1993
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = "@(#)inventory.c        8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: inventory.c,v 1.6 1998/11/10 13:01:32 hubertf Exp $");
+__RCSID("$NetBSD: inventory.c,v 1.7 2002/07/07 09:35:08 tron Exp $");
 #endif
 #endif /* not lint */
 
@@ -362,15 +362,15 @@
 }
 
 int
-get_com_id(index, ch)
-       int *index;
+get_com_id(indexp, ch)
+       int *indexp;
        short ch;
 {
        short i;
 
        for (i = 0; i < COMS; i++) {
                if (com_id_tab[i].com_char == ch) {
-                       *index = i;
+                       *indexp = i;
                        return(1);
                }
        }
diff -r 1c03218ff3ec -r 2c663baf5276 games/rogue/score.c
--- a/games/rogue/score.c       Sun Jul 07 07:37:50 2002 +0000
+++ b/games/rogue/score.c       Sun Jul 07 09:35:07 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: score.c,v 1.9 2001/08/09 13:02:49 wiz Exp $    */
+/*     $NetBSD: score.c,v 1.10 2002/07/07 09:35:08 tron Exp $  */
 
 /*
  * Copyright (c) 1988, 1993
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = "@(#)score.c    8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: score.c,v 1.9 2001/08/09 13:02:49 wiz Exp $");
+__RCSID("$NetBSD: score.c,v 1.10 2002/07/07 09:35:08 tron Exp $");
 #endif
 #endif /* not lint */
 
@@ -209,7 +209,7 @@
        char buf[128];
        FILE *fp;
        long s;
-       boolean pause = score_only;
+       boolean dopause = score_only;
 
        md_lock(1);
 
@@ -322,7 +322,7 @@
        refresh();
        fclose(fp);
        message("", 0);
-       if (pause) {
+       if (dopause) {
                message("", 0);
        }
        clean_up("");



Home | Main Index | Thread Index | Old Index