From: simon Date: Mon, 14 Apr 2008 11:32:06 +0000 (+0000) Subject: Shamelessly pander to compilers whose data flow warning systems X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/commitdiff_plain/3c082202687e8cf4611cc40f6c97f329ef7194b0 Shamelessly pander to compilers whose data flow warning systems insist that a variable should be initialised in all branches of an if, instead of just all the non-assertion-failing ones. git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7989 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/solo.c b/solo.c index 1879a98..8ec0296 100644 --- a/solo.c +++ b/solo.c @@ -2779,10 +2779,10 @@ static game_state *new_game(midend *me, game_params *params, char *desc) if (*desc == '_') c = 0; - else if (*desc >= 'a' && *desc <= 'z') + else { + assert(*desc >= 'a' && *desc <= 'z'); c = *desc - 'a' + 1; - else - assert(!"Shouldn't get here"); + } desc++; adv = (c != 25); /* 'z' is a special case */