upgrade some casts from void* to more specific type

This commit is contained in:
rlar 2010-07-09 19:03:02 +00:00
parent d7e2e7f7f0
commit 7d6abb2fde
4 changed files with 13 additions and 7 deletions

View File

@ -1,3 +1,9 @@
2010-07-09 Robert Larice
* src/frontend/spiceif.c ,
* src/spicelib/analysis/tfanal.c ,
* src/spicelib/parser/inpaname.c :
upgrade some casts from void* to more specific type
2010-07-09 Robert Larice
* src/xspice/cm/cm.c ,
* src/xspice/cm/cmevt.c ,

View File

@ -585,14 +585,14 @@ finddev_special(
return(type);
}
type = -1;
*devptr = (void *)NULL;
*devptr = (GENinstance *)NULL;
err = (*(ft_sim->findModel))(ck,&type,modptr,name);
if(err == OK)
{
*device_or_model=1;
return(type);
}
*modptr = (void *)NULL;
*modptr = (GENmodel *)NULL;
*device_or_model=2;
return(-1);
@ -1159,10 +1159,10 @@ finddev(CKTcircuit *ck, char *name, GENinstance **devptr, GENmodel **modptr)
err = (*(ft_sim->findInstance))(ck,&type,devptr,name,NULL,NULL);
if(err == OK) return(type);
type = -1;
*devptr = (void *)NULL;
*devptr = (GENinstance *)NULL;
err = (*(ft_sim->findModel))(ck,&type,modptr,name);
if(err == OK) return(type);
*modptr = (void *)NULL;
*modptr = (GENmodel *)NULL;
return(-1);
}

View File

@ -49,7 +49,7 @@ TFanal(CKTcircuit *ckt, int restart)
Vtype = CKTtypelook("Vsource");
if(Itype != -1) {
error = CKTfndDev(ckt,&Itype,&ptr,
((TFan*)ckt->CKTcurJob)->TFinSrc, (void *)NULL,(IFuid)NULL);
((TFan*)ckt->CKTcurJob)->TFinSrc, (GENmodel *)NULL, (IFuid)NULL);
if(error ==0) {
((TFan*)ckt->CKTcurJob)->TFinIsI = 1;
((TFan*)ckt->CKTcurJob)->TFinIsV = 0;
@ -60,7 +60,7 @@ TFanal(CKTcircuit *ckt, int restart)
if( (Vtype != -1) && (ptr==NULL) ) {
error = CKTfndDev(ckt,&Vtype,&ptr,
((TFan*)ckt->CKTcurJob)->TFinSrc, (void *)NULL,
((TFan*)ckt->CKTcurJob)->TFinSrc, (GENmodel *)NULL,
(IFuid)NULL);
((TFan*)ckt->CKTcurJob)->TFinIsV = 1;
((TFan*)ckt->CKTcurJob)->TFinIsI = 0;

View File

@ -40,7 +40,7 @@ INPaName(char *parm, IFvalue * val, CKTcircuit *ckt, int *dev, char *devnam,
* (name, type, direct pointer) - the type and direct pointer
* WILL be set on return unless error is not OK
*/
error = (*(sim->findInstance)) (ckt, dev, fast, devnam, (void *) NULL,
error = (*(sim->findInstance)) (ckt, dev, fast, devnam, (GENmodel *) NULL,
(char *) NULL);
if (error)
return (error);