diff --git a/src/frontend/subckt.c b/src/frontend/subckt.c index f0bca1aac..2c492819c 100644 --- a/src/frontend/subckt.c +++ b/src/frontend/subckt.c @@ -396,7 +396,7 @@ inp_subcktexpand(struct line *deck) { /*-------------------------------------------------------------------*/ static struct line * doit(struct line *deck) { - struct line *c, *lcc; + struct line *c; struct subs *sssfree = NULL, *sss = NULL; /* *sss temporarily hold decks to substitute */ int nest, numpasses = MAXNEST; bool gotone; @@ -421,6 +421,8 @@ doit(struct line *deck) { /* First pass: xtract all the .subckts and stick pointers to them into sss. */ for (last = deck, lc = NULL; last; ) { + struct line *lcc; + if (ciprefix(sbend, last->li_line)) { /* if line == .ends */ fprintf(cp_err, "Error: misplaced %s line: %s\n", sbend, last->li_line); @@ -498,7 +500,6 @@ doit(struct line *deck) { sss->su_next = subs; subs = sss; /* Now that sss is built, assign it to subs */ last = c->li_next; - lcc = subs->su_def; /*gp */ c->li_next = NULL; /* Numparam needs line c */ @@ -548,6 +549,7 @@ doit(struct line *deck) { char *tofree, *tofree2, *s, *t; char *scname, *subname; + struct line *lcc; gotone = TRUE; t = tofree = s = copy(c->li_line); /* s & t hold copy of component line */