A nice patch from Larry Doolittle that adds -Wshadow and

cleans up most of the now-revealed problems.
This commit is contained in:
Eric Andersen
2001-03-21 07:34:27 +00:00
parent 7447642a47
commit 1ca20a7747
28 changed files with 221 additions and 222 deletions

10
tr.c
View File

@@ -123,19 +123,19 @@ static unsigned int expand(char *arg, register unsigned char *buffer)
static int complement(unsigned char *buffer, int buffer_len)
{
register short i, j, index;
register short i, j, ix;
char conv[ASCII + 2];
index = 0;
ix = 0;
for (i = 0; i <= ASCII; i++) {
for (j = 0; j < buffer_len; j++)
if (buffer[j] == i)
break;
if (j == buffer_len)
conv[index++] = i & ASCII;
conv[ix++] = i & ASCII;
}
memcpy(buffer, conv, index);
return index;
memcpy(buffer, conv, ix);
return ix;
}
extern int tr_main(int argc, char **argv)