mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
Ben Hutchings reports that gcc 4 gives an optimiser warning because
it can't tell that one branch of a particular switch is always taken. Adding a default clause with an automatic assertion failure apparently fixes it. [originally from svn r6148]
This commit is contained in:
2
rect.c
2
rect.c
@ -1348,6 +1348,8 @@ static char *new_game_desc(game_params *params, random_state *rs,
|
|||||||
r1.x++;
|
r1.x++;
|
||||||
r1.w--;
|
r1.w--;
|
||||||
break;
|
break;
|
||||||
|
default: /* should never happen */
|
||||||
|
assert(!"invalid direction");
|
||||||
}
|
}
|
||||||
if (r1.h > 0 && r1.w > 0)
|
if (r1.h > 0 && r1.w > 0)
|
||||||
place_rect(params2, grid, r1);
|
place_rect(params2, grid, r1);
|
||||||
|
Reference in New Issue
Block a user