From 9621a4712b7df55d6fe4fff44789c8e4c7476013 Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Wed, 19 Feb 2014 22:40:27 +0100 Subject: [PATCH] Warnings: correctly use #ifdef for declarations. --- TODO | 2 ++ gnushogi/commondsp.c | 2 ++ gnushogi/eval.c | 11 ++++++++--- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index d4bbfb8..a3f60ea 100644 --- a/TODO +++ b/TODO @@ -30,6 +30,8 @@ Minishogi-related stuff - minishogi patterns - tune difficulty levels - other tunings to investigate + * eval.c has lots of heuristic code specific to standard shogi that + probably should not been used * PromotionZoneDistanceBonus * OPENING_HINT - add minishogi stuff to the doc diff --git a/gnushogi/commondsp.c b/gnushogi/commondsp.c index 1950b42..14fd387 100644 --- a/gnushogi/commondsp.c +++ b/gnushogi/commondsp.c @@ -1494,7 +1494,9 @@ SetMachineTime(char *time) void InputCommand(char *command) { +#ifdef QUIETBACKGROUND short have_shown_prompt = false; +#endif short ok, done, is_move = false; unsigned short mv; char s[80], sx[80]; diff --git a/gnushogi/eval.c b/gnushogi/eval.c index 12197a2..97b748e 100644 --- a/gnushogi/eval.c +++ b/gnushogi/eval.c @@ -339,6 +339,7 @@ on_csquare(short side, short piece, short square) } +#ifndef MINISHOGI inline static short on_column(short side, short piece, short c) { @@ -385,13 +386,12 @@ on_right_side(short side, short piece) return false; } +#endif short pscore[2]; /* piece score for each side */ - - /* * Fill array attack[side][] with info about attacks to a square. Bits * 16-31 are set if the piece (king .. pawn) attacks the square. Bits 0-15 @@ -826,7 +826,10 @@ BRLscan(short sq, short *mob) #endif short s, mobx; - short u, xu, pin, ptyp, csq = column(sq); + short u, xu, pin, ptyp; +#ifndef MINISHOGI + short csq = column(sq); +#endif short piece, upiece, xupiece, rvalue, ds; small_short *Kd = Kdist[c2]; @@ -1334,7 +1337,9 @@ PawnValue(short sq, short side) { short s = 0; short ds; +#ifndef MINISHOGI short ccol = ccolumn(c1, sq); +#endif PromotionZoneDistanceValue(sq, 3); -- 1.7.0.4