INPparseNumMod(), #11/14, remove unused 'cardType'

This commit is contained in:
rlar
2016-07-17 18:26:27 +02:00
parent 521fd16c11
commit c4d39d66de
+1 -7
View File
@@ -331,7 +331,6 @@ INPparseNumMod( CKTcircuit* ckt, INPmodel *model, INPtables *tab, char **errMess
char *line; char *line;
char *cardName = NULL; /* name of a card */ char *cardName = NULL; /* name of a card */
char *parm; /* name of a parameter */ char *parm; /* name of a parameter */
int cardType; /* type/index for the current card */
int cardNum = 0; /* number of this card in the overall line */ int cardNum = 0; /* number of this card in the overall line */
int lastType = E_MISSING; /* type of previous card */ int lastType = E_MISSING; /* type of previous card */
char *err = NULL, *tmp; /* Strings for error messages */ char *err = NULL, *tmp; /* Strings for error messages */
@@ -348,7 +347,6 @@ INPparseNumMod( CKTcircuit* ckt, INPmodel *model, INPtables *tab, char **errMess
/* Now parse each remaining card */ /* Now parse each remaining card */
for (; txtCard; txtCard = txtCard->nextcard) { for (; txtCard; txtCard = txtCard->nextcard) {
line = txtCard->line; line = txtCard->line;
cardType = E_MISSING;
cardNum++; cardNum++;
/* Skip the initial '+' and any whitespace. */ /* Skip the initial '+' and any whitespace. */
@@ -374,14 +372,10 @@ INPparseNumMod( CKTcircuit* ckt, INPmodel *model, INPtables *tab, char **errMess
lastType = E_MISSING; lastType = E_MISSING;
continue; continue;
} }
cardType = lastType;
while (*line == '+') line++; /* Skip leading '+'s */ while (*line == '+') line++; /* Skip leading '+'s */
lastType = cardType;
// cardType is not used downwards from here
break; break;
default: default:
lastType = cardType; lastType = E_MISSING;
// cardType is not used downwards from here
break; break;
} }