drop some more casts

This commit is contained in:
rlar 2012-02-06 20:11:10 +00:00
parent d03d5dfa2d
commit d5f6bcbedf
11 changed files with 37 additions and 24 deletions

View File

@ -1,3 +1,16 @@
2012-02-06 Robert Larice
* src/frontend/outitf.c ,
* src/frontend/spiceif.c ,
* src/frontend/subckt.c ,
* src/frontend/plotting/graf.c ,
* src/spicelib/analysis/cktnames.c ,
* src/spicelib/devices/hisim2/hsm2noi.c ,
* src/spicelib/devices/hisimhv/hsmhvnoi.c ,
* src/spicelib/parser/ifnewuid.c ,
* src/spicelib/parser/inpptree.c ,
* src/xspice/mif/mifsetup.c :
drop some more casts
2012-02-06 Robert Larice
* src/spicelib/analysis/analysis.c ,
* src/spicelib/devices/urc/urcsetup.c :

View File

@ -105,8 +105,8 @@ if (ARCHme != 0) return(OK);
name = "circuit name";
return (beginPlot(analysisPtr, circuitPtr, name,
(char *) analName, (char *) refName, refType, numNames,
(char **) dataNames, dataType, FALSE,
analName, refName, refType, numNames,
dataNames, dataType, FALSE,
(runDesc **) plotPtr));
}
@ -121,8 +121,8 @@ OUTwBeginPlot(CKTcircuit *circuitPtr, JOB *analysisPtr,
#endif /* PARALLEL_ARCH */
return (beginPlot(analysisPtr, circuitPtr, "circuit name",
(char *) analName, (char *) refName, refType, numNames,
(char **) dataNames, dataType, TRUE,
analName, refName, refType, numNames,
dataNames, dataType, TRUE,
(runDesc **) plotPtr));
}

View File

@ -114,9 +114,9 @@ gr_init(double *xlims, double *ylims, /* The size of the screen. */
}
if (cp_getvar("ticlist", CP_LIST, ticlist)) {
wl = (wordlist *)vareval("ticlist");
ticlist = (char *)wl_flatten(wl);
graph->ticdata = (double *) readtics(ticlist);
wl = vareval("ticlist");
ticlist = wl_flatten(wl);
graph->ticdata = readtics(ticlist);
} else
graph->ticdata = NULL;

View File

@ -889,7 +889,7 @@ if_setparam_model(CKTcircuit *ckt, char **name, char *val )
if ( prevMod == NULL ) ckt->CKThead[typecode] = mods->GENnextModel;
else prevMod->GENnextModel = mods->GENnextModel;
INPgetMod( ckt, (char *)mods->GENmodName, &inpmod, ft_curckt->ci_symtab );
INPgetMod( ckt, mods->GENmodName, &inpmod, ft_curckt->ci_symtab );
inpmod->INPmodUsed = 0;
FREE(mods);

View File

@ -1071,7 +1071,7 @@ translate(struct line *deck, char *formal, char *actual, char *scname, char *sub
/* Next we handle the POLY (if any) */
/* get next token */
t = s;
next_name = (char *)gettok_noparens(&t);
next_name = gettok_noparens(&t);
if ( (strcmp(next_name, "POLY") == 0) ||
(strcmp(next_name, "poly") == 0)) { /* found POLY . . . . */

View File

@ -38,7 +38,7 @@ CKTdnames(CKTcircuit *ckt)
i=0;
for (here = ckt->CKTnodes->next; here; here = here->next) {
printf("%03d: %s\n", here->number, (char *)here->name);
printf("%03d: %s\n", here->number, here->name);
}
return(OK);
}

View File

@ -81,7 +81,7 @@ int HSM2noise (
case N_DENS:
for ( i = 0; i < HSM2NSRCS; i++ ) {
(void) sprintf(name, "onoise.%s%s",
(char *)here->HSM2name, HSM2nNames[i]);
here->HSM2name, HSM2nNames[i]);
data->namelist =
TREALLOC(IFuid, data->namelist, data->numPlots + 1);
if (!data->namelist)
@ -94,7 +94,7 @@ int HSM2noise (
case INT_NOIZ:
for ( i = 0; i < HSM2NSRCS; i++ ) {
(void) sprintf(name, "onoise_total.%s%s",
(char *)here->HSM2name, HSM2nNames[i]);
here->HSM2name, HSM2nNames[i]);
data->namelist =
TREALLOC(IFuid, data->namelist, data->numPlots + 1);
if (!data->namelist)
@ -104,7 +104,7 @@ int HSM2noise (
NULL, name, UID_OTHER, NULL);
(void) sprintf(name, "inoise_total.%s%s",
(char *)here->HSM2name, HSM2nNames[i]);
here->HSM2name, HSM2nNames[i]);
data->namelist =
TREALLOC(IFuid, data->namelist, data->numPlots + 1);
if (!data->namelist)

View File

@ -81,7 +81,7 @@ int HSMHVnoise (
case N_DENS:
for ( i = 0; i < HSMHVNSRCS; i++ ) {
(void) sprintf(name, "onoise.%s%s",
(char *)here->HSMHVname, HSMHVnNames[i]);
here->HSMHVname, HSMHVnNames[i]);
data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1);
if (!data->namelist)
return(E_NOMEM);
@ -93,7 +93,7 @@ int HSMHVnoise (
case INT_NOIZ:
for ( i = 0; i < HSMHVNSRCS; i++ ) {
(void) sprintf(name, "onoise_total.%s%s",
(char *)here->HSMHVname, HSMHVnNames[i]);
here->HSMHVname, HSMHVnNames[i]);
data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1);
if (!data->namelist)
return(E_NOMEM);
@ -102,7 +102,7 @@ int HSMHVnoise (
(IFuid) NULL, name, UID_OTHER, NULL);
(void) sprintf(name, "inoise_total.%s%s",
(char *)here->HSMHVname, HSMHVnNames[i]);
here->HSMHVname, HSMHVnNames[i]);
data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1);
if (!data->namelist)
return(E_NOMEM);

View File

@ -37,10 +37,10 @@ IFnewUid(CKTcircuit *ckt, IFuid * newuid, IFuid olduid, char *suffix, int type,
if (olduid) {
#ifdef HAVE_ASPRINTF
asprintf(&newname, "%s#%s", (char *) olduid, suffix);
asprintf(&newname, "%s#%s", olduid, suffix);
#else /* ~ HAVE_ASPRINTF */
newname = TMALLOC(char, strlen((char *) olduid) + strlen(suffix) + 2); /* 2 = strlen("#\0") */
sprintf(newname, "%s#%s", (char *) olduid, suffix);
newname = TMALLOC(char, strlen(olduid) + strlen(suffix) + 2); /* 2 = strlen("#\0") */
sprintf(newname, "%s#%s", olduid, suffix);
#endif /* HAVE_ASPRINTF */
} else {
@ -62,15 +62,15 @@ IFnewUid(CKTcircuit *ckt, IFuid * newuid, IFuid olduid, char *suffix, int type,
error = INPinsert(&newname, ft_curckt->ci_symtab);
if (error && error != E_EXISTS)
return (error);
*newuid = (IFuid) newname;
*newuid = newname;
break;
case UID_SIGNAL:
error = INPmkTerm(ckt, &newname,
(INPtables *) ft_curckt->ci_symtab, nodedata);
ft_curckt->ci_symtab, nodedata);
if (error && error != E_EXISTS)
return (error);
*newuid = (IFuid) newname;
*newuid = newname;
break;
default:

View File

@ -928,7 +928,7 @@ static INPparseNode *mkinode(char *name)
values = TMALLOC(IFvalue, 1);
types = TMALLOC(int, 1);
}
values[i].uValue = (IFuid) name;
values[i].uValue = name;
types[i] = IF_INSTANCE;
numvalues++;
}

View File

@ -353,7 +353,7 @@ MIFsetup(
if(smp_data_out->ibranch == 0) {
IFuid names[2];
names[0] = here->MIFname;
names[1] = (IFuid) here->conn[i]->port[j]->vsource_str;
names[1] = here->conn[i]->port[j]->vsource_str;
SPfrontEnd->IFerror (ERR_FATAL,
"%s: unknown controlling source %s",names);
return(E_BADPARM);