Fix various departures from C found by `gcc -ansi -pedantic'. I

haven't checked in Makefile changes to enable this, but I'll at
least fix the specific problems it found when enabled as a one-off.

[originally from svn r5902]
This commit is contained in:
Simon Tatham
2005-06-02 08:14:14 +00:00
parent 09c396b8a8
commit ad2ec32e1c
5 changed files with 28 additions and 26 deletions

View File

@ -260,12 +260,12 @@ static void do_rotate(int *grid, int w, int h, int n, int orientable,
for (j = 0; j < n/2; j++) {
int k;
int g[4];
int p[4] = {
j*w+i,
i*w+(n-j-1),
(n-j-1)*w+(n-i-1),
(n-i-1)*w+j
};
int p[4];
p[0] = j*w+i;
p[1] = i*w+(n-j-1);
p[2] = (n-j-1)*w+(n-i-1);
p[3] = (n-i-1)*w+j;
for (k = 0; k < 4; k++)
g[k] = grid[p[k]];