From 6f2f634413ab39485a117b49baff8a8ee8320dae Mon Sep 17 00:00:00 2001 From: rlar Date: Tue, 26 Jul 2011 17:43:08 +0000 Subject: [PATCH] swallow unsed variable warnings in adms generated code, upagrade dependencies --- ChangeLog | 14 ++++++++++++++ src/include/ngspice.h | 1 + src/spicelib/devices/adms/admst/ngspice.xml | 13 +++++++++++++ 3 files changed, 28 insertions(+) diff --git a/ChangeLog b/ChangeLog index 310e5e2b3..0cda34f8b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2011-07-26 Robert Larice + * src/include/ngspice.h , + * src/spicelib/devices/adms/admst/ngspice.xml : + swallow unsed variable warnings in adms generated code, upagrade dependencies + +2011-07-26 Laurent Lemaitre + * src/spicelib/devices/adms/admst/ngspice.xml : + Fixed code generation for ekv by adding definition of min and max and logE. + +2011-07-25 Laurent Lemaitre + * src/spicelib/devices/adms/admst/ngspice.xml : + fixed handling of expressions used as default value in parameter definition: + parameter real p=ln(q) + 2011-07-25 Robert Larice * src/spicelib/devices/adms/admst/ngspice.xml : convert K&R function definitions to ansi style diff --git a/src/include/ngspice.h b/src/include/ngspice.h index d91d30153..a92e1e1b1 100644 --- a/src/include/ngspice.h +++ b/src/include/ngspice.h @@ -249,6 +249,7 @@ extern int tcl_fprintf(FILE *f, const char *format, ...); /* macro to ignore unused variables and parameters */ #define NG_IGNORE(x) (void)x +#define NG_IGNOREABLE(x) (void)x #endif /* NGSPICE_H_INCLUDED */ diff --git a/src/spicelib/devices/adms/admst/ngspice.xml b/src/spicelib/devices/adms/admst/ngspice.xml index f76575f4d..316314e1d 100644 --- a/src/spicelib/devices/adms/admst/ngspice.xml +++ b/src/spicelib/devices/adms/admst/ngspice.xml @@ -3595,6 +3595,7 @@ inline double _d0_vt(double) { return 1.3806503e-23/1.602176462e-1 int $(module)temp(GENmodel *inModel, CKTcircuit *ckt) { + NG_IGNOREABLE(ckt); register $(module)model *model = ($(module)model*)inModel; register $(module)instance *here; for ( ; model != NULL; model = model->$(module)nextModel ) @@ -3617,6 +3618,7 @@ int $(module)temp(GENmodel *inModel, CKTcircuit *ckt) ## Process this file with automake to produce Makefile.in ADMSXMLINTERFACE=\$(srcdir)/../admst +$(module).c: \$(ADMSXMLINTERFACE)/ngspice.xml $(module).c: admsva/$(module).va admsXml -I\$(srcdir) -I\$(srcdir)/admsva -f \$(srcdir)/admsva/$(module).va -e \$(ADMSXMLINTERFACE)/ngspice.xml perl -p -i.bak -e 's/IOP\\("(\\w+)"/IOP("\\L\\1"/' $(module).c @@ -4168,6 +4170,10 @@ typedef struct s$(module)model { /* model structure */ int $(module)ask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { $(module)instance *instance = ($(module)instance*)inst; + NG_IGNOREABLE(ckt); + NG_IGNOREABLE(value); + NG_IGNOREABLE(select); + NG_IGNOREABLE(instance); switch (which) { @@ -4214,6 +4220,7 @@ int $(module)ask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, int $(module)mAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { + NG_IGNOREABLE(ckt); $(module)model *model = ($(module)model *)inst; switch (which) { @@ -4260,6 +4267,9 @@ int $(module)mAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) int $(module)par(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { $(module)instance *myinstance = ($(module)instance*)inst; + NG_IGNOREABLE(value); + NG_IGNOREABLE(select); + NG_IGNOREABLE(myinstance); switch (param) { @@ -4640,6 +4650,7 @@ int $(module)acLoad(GENmodel *inModel, CKTcircuit *ckt) int $(module)pzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { + NG_IGNOREABLE(ckt); register $(module)model *model = ($(module)model*)inModel; register $(module)instance *here; for ( ; model != NULL; model = model->$(module)nextModel ) @@ -5191,6 +5202,8 @@ void $(module)destroy(GENmodel **inModel) int $(module)guesstopology (SMPmatrix *matrix, CKTcircuit *ckt, $(module)model *model, $(module)instance *here) /* guess topology */ { + NG_IGNOREABLE(matrix); + NG_IGNOREABLE(ckt);