OSDN Git Service

eliminate warnings
authorSHIRAKATA Kentaro <argrath@ub32.org>
Thu, 16 Nov 2017 13:11:54 +0000 (22:11 +0900)
committerSHIRAKATA Kentaro <argrath@ub32.org>
Sun, 21 Jan 2018 18:42:21 +0000 (03:42 +0900)
17 files changed:
src/apply.c
src/artifact.c
src/attrib.c
src/do.c
src/eat.c
src/mhitu.c
src/objnam.c
src/polyself.c
src/potion.c
src/role.c
src/shk.c
src/steal.c
src/topten.c
src/weapon.c
src/wield.c
src/write.c
sys/winnt/nttty.c

index e018ec0..0ab5920 100644 (file)
@@ -240,7 +240,9 @@ int rx, ry, *resp;
 {
     char buf[BUFSZ];
     boolean more_corpses;
+#if 0 /*JP*/
     struct permonst *mptr;
+#endif
     struct obj *corpse = sobj_at(CORPSE, rx, ry),
                *statue = sobj_at(STATUE, rx, ry);
 
index f91dcb2..38c5dd3 100644 (file)
@@ -986,7 +986,11 @@ boolean vis;               /* whether the action can be seen */
 char *hittee;              /* target's name: "you" or mon_nam(mdef) */
 {
     struct permonst *old_uasmon;
+#if 0 /*JP*/
     const char *verb, *fakename;
+#else
+    const char *verb;
+#endif
     boolean youattack = (magr == &youmonst), youdefend = (mdef == &youmonst),
             resisted = FALSE, do_stun, do_confuse, result;
     int attack_indx, scare_dieroll = MB_MAX_DIEROLL / 2;
index 369a0f9..94bb78e 100644 (file)
@@ -926,7 +926,9 @@ int propidx; /* special cases can have negative values */
         static NEARDATA const char because_of[] = "%s\82É\82æ\82Á\82Ä";
 
         if (propidx >= 0) {
+#if 0 /*JP*/
             char *p;
+#endif
             struct obj *obj = (struct obj *) 0;
             int innate = is_innate(propidx);
 
index 4e2289f..7f9737e 100644 (file)
--- a/src/do.c
+++ b/src/do.c
@@ -1819,7 +1819,9 @@ boolean at_stairs, falling, portal;
 #endif
         };
         const char *mesg;
+#if 0 /*JP*/
         char buf[BUFSZ];
+#endif
         int which = rn2(4);
 
         if (Hallucination)
index 3993284..b74b413 100644 (file)
--- a/src/eat.c
+++ b/src/eat.c
@@ -1393,7 +1393,9 @@ struct obj *obj;
 int mnum;
 char *buf;
 {
+#if 0 /*JP*/
     char buf2[BUFSZ];
+#endif
     int r = tin_variety(obj, TRUE);
 
     if (obj && buf) {
index 76c1ca6..f3b122a 100644 (file)
@@ -718,7 +718,11 @@ register struct monst *mtmp;
 
         if (!rn2(10) && !mtmp->mcan) {
             int numseen, numhelp;
+#if 0 /*JP*/
             char buf[BUFSZ], genericwere[BUFSZ];
+#else
+            char genericwere[BUFSZ];
+#endif
 
 /*JP
             Strcpy(genericwere, "creature");
index 05d4952..22c50f4 100644 (file)
@@ -1080,9 +1080,11 @@ boolean with_price;
     boolean known, cknown, bknown, lknown;
     int omndx = obj->corpsenm;
     char prefix[PREFIX];
+#if 0 /*JP*/
     char tmpbuf[PREFIX + 1]; /* for when we have to add something at
                                 the start of prefix instead of the
                                 end (Strcat is used on the end) */
+#endif
     register char *bp = xname(obj);
 #if 1 /*JP*//*\8f\87\8f\98\93ü\82ê\91Ö\82¦\82É\8eg\82¤*/
     char preprefix[PREFIX];
@@ -3034,15 +3036,15 @@ struct obj *no_wish;
     int eroded, eroded2, erodeproof;
     int halfeaten, mntmp, contents;
     int islit, unlabeled, ishistoric, isdiluted, trapped;
+#if 0 /*JP*/
     int tmp, tinv, tvariety;
+#else
+    int tvariety;
+#endif
     int wetness;
     struct fruit *f;
     int ftype = context.current_fruit;
     char fruitbuf[BUFSZ];
-#if 1 /*JP*/
-    char buf[BUFSZ];
-    char pfx[BUFSZ];
-#endif
     /* Fruits may not mess up the ability to wish for real objects (since
      * you can leave a fruit in a bones file and it will be added to
      * another person's game), so they must be checked for last, after
index e7b784b..2692853 100644 (file)
@@ -541,7 +541,11 @@ int psflags;
                     You("\97Ø\82Ì\8aZ\82Æ\88ê\91Ì\89»\82µ\82½\81D");
                 } else { /* dragon scale mail */
                     /* d.scale mail first reverts to scales */
+#if 0 /*JP*/
                     char *p, *dsmail;
+#else
+                    char *dsmail;
+#endif
 
                     /* similar to noarmor(invent.c),
                        shorten to "<color> scale mail" */
@@ -1183,7 +1187,11 @@ drop_weapon(alone)
 int alone;
 {
     struct obj *otmp;
+#if 0 /*JP*/
     const char *what, *which, *whichtoo;
+#else
+    const char *which, *whichtoo;
+#endif
     boolean candropwep, candropswapwep;
 
     if (uwep) {
index c646e57..483ecbd 100644 (file)
@@ -268,7 +268,9 @@ boolean talk;
 {
     long old = Blinded;
     boolean u_could_see, can_see_now;
+#if 0 /*JP*/
     const char *eyes;
+#endif
 
     /* we need to probe ahead in case the Eyes of the Overworld
        are or will be overriding blindness */
index ffa0cac..ee5915b 100644 (file)
@@ -1947,7 +1947,11 @@ int buflen, rolenum, racenum, gendnum, alignnum;
 */
     const char *defprompt = "\93K\93\96\82É\83L\83\83\83\89\83N\83^\81[\82ð\91I\82ñ\82Å\82æ\82¢\82Å\82·\82©\81H[ynaq] ";
     int num_post_attribs = 0;
+#if 0 /*JP*/
     char tmpbuf[BUFSZ], *p;
+#else
+    char tmpbuf[BUFSZ];
+#endif
 
     if (buflen < QBUFSZ)
         return (char *) defprompt;
index 537a130..ddad293 100644 (file)
--- a/src/shk.c
+++ b/src/shk.c
@@ -2690,7 +2690,11 @@ const char *fmt; /* "%s %ld %s %s", doname(obj), amt, plur(amt), arg */
 long amt;
 const char *arg;
 {
+#if 0 /*JP*/
     char *obj_name, fmtbuf[BUFSZ];
+#else
+    char *obj_name;
+#endif
     boolean was_unknown = !obj->dknown;
 
     obj->dknown = TRUE;
@@ -3451,7 +3455,11 @@ xchar x, y;
         }
     } else {
         char qbuf[BUFSZ], qsfx[BUFSZ];
+#if 0 /*JP*/
         boolean short_funds = (offer > shkmoney), one;
+#else
+        boolean short_funds = (offer > shkmoney);
+#endif
 
         if (short_funds)
             offer = shkmoney;
index 8aab80c..b48dd9a 100644 (file)
@@ -100,8 +100,10 @@ register struct monst *mtmp;
     register struct obj *fgold = g_at(u.ux, u.uy);
     register struct obj *ygold;
     register long tmp;
+#if 0 /*JP*/
     struct monst *who;
     const char *whose, *what;
+#endif
 
     /* skip lesser coins on the floor */
     while (fgold && fgold->otyp != GOLD_PIECE)
index dbd1266..164a3b2 100644 (file)
@@ -110,7 +110,9 @@ int how;
         /* PANICKED, TRICKED, QUIT, ESCAPED, ASCENDED */
         "", "", "", "", ""
     };
+#if 0 /*JP*/
     unsigned l;
+#endif
     char *kname = killer.name;
 
     buf[0] = '\0'; /* so strncat() can find the end */
@@ -826,7 +828,11 @@ boolean so;
 {
     boolean second_line = TRUE;
     char linebuf[BUFSZ];
+#if 0 /*JP*/
     char *bp, hpbuf[24], linebuf3[BUFSZ];
+#else
+    char *bp, hpbuf[24];
+#endif
     int hppos, lngr;
 #if 1 /*JP*/
     char who[BUFSZ];
index 65fd604..d2ce35f 100644 (file)
@@ -719,7 +719,9 @@ register struct monst *mon;
          */
         if (mw_tmp && mwelded(mw_tmp)) {
             if (canseemon(mon)) {
+#if 0 /*JP*/
                 char welded_buf[BUFSZ];
+#endif
                 const char *mon_hand = mbodypart(mon, HAND);
 
                 if (bimanual(mw_tmp))
index d28eb7f..420bbf6 100644 (file)
@@ -483,7 +483,9 @@ struct obj *obj;
 const char *verb; /* "rub",&c */
 {
     const char *what;
+#if 0 /*JP*/
     boolean more_than_1;
+#endif
 
     if (obj == uwep)
         return TRUE; /* nothing to do if already wielding it */
index e35bb04..2e82397 100644 (file)
@@ -100,7 +100,11 @@ dowrite(pen)
 register struct obj *pen;
 {
     register struct obj *paper;
+#if 0 /*JP*/
     char namebuf[BUFSZ], *nm, *bp;
+#else
+    char namebuf[BUFSZ], *nm;
+#endif
     register struct obj *new_obj;
     int basecost, actualcost;
     int curseval;
index 293b707..c390929 100644 (file)
@@ -500,7 +500,7 @@ int ch2;
 
     attrs[0] = attrs[1] = attr;
 
-    WriteConsoleOutputAttribute(hConOut,&attrs,2,
+    WriteConsoleOutputAttribute(hConOut,(WORD *)(&attrs),2,
                                cursor,&acount);
     WriteConsoleOutputCharacter(hConOut,buf,2,
                                cursor,&ccount);