Kaydet (Commit) f1aeab7f authored tarafından Guido van Rossum's avatar Guido van Rossum

fix what lint found

üst 8b27d929
...@@ -313,7 +313,6 @@ com_backpatch(c, anchor) ...@@ -313,7 +313,6 @@ com_backpatch(c, anchor)
{ {
unsigned char *code = (unsigned char *) getstringvalue(c->c_code); unsigned char *code = (unsigned char *) getstringvalue(c->c_code);
int target = c->c_nexti; int target = c->c_nexti;
int lastanchor = 0;
int dist; int dist;
int prev; int prev;
for (;;) { for (;;) {
...@@ -324,7 +323,6 @@ com_backpatch(c, anchor) ...@@ -324,7 +323,6 @@ com_backpatch(c, anchor)
code[anchor+1] = dist >> 8; code[anchor+1] = dist >> 8;
if (!prev) if (!prev)
break; break;
lastanchor = anchor;
anchor -= prev; anchor -= prev;
} }
} }
...@@ -408,18 +406,16 @@ static object * ...@@ -408,18 +406,16 @@ static object *
parsenumber(s) parsenumber(s)
char *s; char *s;
{ {
extern long strtol(); extern long strtol PROTO((const char *, char **, int));
extern unsigned long strtoul(); extern unsigned long strtoul PROTO((const char *, char **, int));
extern double strtod(); extern double strtod PROTO((const char *, char **));
char *end; char *end;
long x; long x;
double xx; double xx;
errno = 0; errno = 0;
end = s + strlen(s) - 1; end = s + strlen(s) - 1;
if (*end == 'l' || *end == 'L') { if (*end == 'l' || *end == 'L')
extern object *long_scan();
return long_scan(s, 0); return long_scan(s, 0);
}
if (s[0] == '0') if (s[0] == '0')
x = (long) strtoul(s, &end, 0); x = (long) strtoul(s, &end, 0);
else else
...@@ -524,7 +520,6 @@ com_list_constructor(c, n) ...@@ -524,7 +520,6 @@ com_list_constructor(c, n)
{ {
int len; int len;
int i; int i;
object *v, *w;
if (TYPE(n) != testlist) if (TYPE(n) != testlist)
REQ(n, exprlist); REQ(n, exprlist);
/* exprlist: expr (',' expr)* [',']; likewise for testlist */ /* exprlist: expr (',' expr)* [',']; likewise for testlist */
...@@ -669,7 +664,6 @@ com_call_function(c, n) ...@@ -669,7 +664,6 @@ com_call_function(c, n)
com_addbyte(c, BINARY_CALL); com_addbyte(c, BINARY_CALL);
} }
else { else {
int i;
REQ(n, testlist); REQ(n, testlist);
com_list(c, n, 1); com_list(c, n, 1);
com_addbyte(c, BINARY_CALL); com_addbyte(c, BINARY_CALL);
...@@ -914,7 +908,6 @@ cmp_type(n) ...@@ -914,7 +908,6 @@ cmp_type(n)
} }
} }
else if (NCH(n) == 2) { else if (NCH(n) == 2) {
int t2 = TYPE(CHILD(n, 1));
switch (TYPE(CHILD(n, 0))) { switch (TYPE(CHILD(n, 0))) {
case NAME: if (strcmp(STR(CHILD(n, 1)), "in") == 0) case NAME: if (strcmp(STR(CHILD(n, 1)), "in") == 0)
return NOT_IN; return NOT_IN;
...@@ -1119,7 +1112,6 @@ com_assign_trailer(c, n, assigning) ...@@ -1119,7 +1112,6 @@ com_assign_trailer(c, n, assigning)
node *n; node *n;
int assigning; int assigning;
{ {
char *name;
REQ(n, trailer); REQ(n, trailer);
switch (TYPE(CHILD(n, 0))) { switch (TYPE(CHILD(n, 0))) {
case LPAR: /* '(' [exprlist] ')' */ case LPAR: /* '(' [exprlist] ')' */
...@@ -1381,7 +1373,6 @@ com_global_stmt(c, n) ...@@ -1381,7 +1373,6 @@ com_global_stmt(c, n)
node *n; node *n;
{ {
int i; int i;
object *v;
REQ(n, global_stmt); REQ(n, global_stmt);
/* 'global' NAME (',' NAME)* */ /* 'global' NAME (',' NAME)* */
for (i = 1; i < NCH(n); i += 2) { for (i = 1; i < NCH(n); i += 2) {
...@@ -1666,10 +1657,11 @@ com_suite(c, n) ...@@ -1666,10 +1657,11 @@ com_suite(c, n)
} }
} }
/* ARGSUSED */
static void static void
com_continue_stmt(c, n) com_continue_stmt(c, n)
struct compiling *c; struct compiling *c;
node *n; node *n; /* Not used, but passed for consistency */
{ {
int i = c->c_nblocks; int i = c->c_nblocks;
if (i-- > 0 && c->c_block[i] == SETUP_LOOP) { if (i-- > 0 && c->c_block[i] == SETUP_LOOP) {
...@@ -1707,7 +1699,7 @@ com_oldbases(c, n) ...@@ -1707,7 +1699,7 @@ com_oldbases(c, n)
struct compiling *c; struct compiling *c;
node *n; node *n;
{ {
int i, nbases; int i;
REQ(n, baselist); REQ(n, baselist);
/* /*
baselist: atom arguments (',' atom arguments)* baselist: atom arguments (',' atom arguments)*
...@@ -1723,7 +1715,7 @@ com_newbases(c, n) ...@@ -1723,7 +1715,7 @@ com_newbases(c, n)
struct compiling *c; struct compiling *c;
node *n; node *n;
{ {
int i, nbases; int i;
REQ(n, testlist); REQ(n, testlist);
/* testlist: test (',' test)* [','] */ /* testlist: test (',' test)* [','] */
for (i = 0; i < NCH(n); i += 2) for (i = 0; i < NCH(n); i += 2)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment