for(l=fn->dcl; l; l=l->next) { if(l->n->op != ONAME || (l->n->class&~PHEAP) != PAUTO || l->n->sym->name[0] == '&' || l->n->used) continue; if(l->n->defn && l->n->defn->op == OTYPESW) { if(l->n->defn->left->used) continue; lineno = l->n->defn->left->lineno; yyerror("%S declared and not used", l->n->sym); l->n->defn->left->used = 1; // suppress repeats } else { lineno = l->n->lineno; // 此处修改 // yyerror("%S declared and not used, l->n->sym); // life } } if(s->def->op == OPACK) { // throw away top-level package name leftover // from previous file. // leave s->block set to cause redeclaration // errors if a conflicting top-level name is // introduced by a different file. if(!s->def->used && !nsyntaxerrors) { // 此处修改 // yyerrorl(s->def->lineno, "imported and not usedsss : \"%Z\"", s->def->pkg->path); } s->def = N; continue; }