From a10be03c754786feb0b81a6803a6cff79af78040 Mon Sep 17 00:00:00 2001 From: Jim Monte Date: Sat, 25 Apr 2020 19:34:31 +0200 Subject: [PATCH] FALLTHROUGH added --- src/spicelib/devices/hfet1/hfetparam.c | 6 +++-- src/spicelib/devices/hfet2/hfet2param.c | 8 +++--- src/spicelib/devices/hisim2/hsm2par.c | 6 +++-- src/spicelib/devices/hisimhv1/hsmhvpar.c | 4 +-- src/spicelib/devices/hisimhv2/hsmhv2par.c | 6 +++-- src/spicelib/devices/isrc/isrcpar.c | 6 +++-- src/spicelib/devices/jfet/jfetpar.c | 6 +++-- src/spicelib/devices/jfet2/jfet2par.c | 6 +++-- src/spicelib/devices/ltra/ltraload.c | 7 ++++++ src/spicelib/devices/ltra/ltrapar.c | 6 ++--- src/spicelib/devices/mes/mesparam.c | 6 +++-- src/spicelib/devices/mesa/mesaparam.c | 6 +++-- src/spicelib/devices/mos1/mos1par.c | 6 +++-- src/spicelib/devices/mos2/mos2dset.c | 30 +++++++++++------------ src/spicelib/devices/mos2/mos2par.c | 6 +++-- src/spicelib/devices/mos3/mos3par.c | 7 +++--- src/spicelib/devices/mos6/mos6par.c | 6 +++-- src/spicelib/devices/mos9/mos9par.c | 7 +++--- src/spicelib/devices/soi3/soi3par.c | 6 +++-- src/spicelib/devices/tra/traparam.c | 6 +++-- src/spicelib/devices/vbic/vbicparam.c | 6 +++-- src/spicelib/devices/vdmos/vdmospar.c | 6 +++-- src/spicelib/devices/vsrc/vsrcpar.c | 11 +++++---- 23 files changed, 106 insertions(+), 64 deletions(-) diff --git a/src/spicelib/devices/hfet1/hfetparam.c b/src/spicelib/devices/hfet1/hfetparam.c index 0641a32ee..959964e48 100644 --- a/src/spicelib/devices/hfet1/hfetparam.c +++ b/src/spicelib/devices/hfet1/hfetparam.c @@ -18,7 +18,7 @@ HFETAparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) NG_IGNORE(select); - switch(param) { + switch (param) { case HFETA_LENGTH: here->HFETAlength = value->rValue; here->HFETAlengthGiven = TRUE; @@ -43,7 +43,9 @@ HFETAparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) here->HFETAoff = value->iValue; break; case HFETA_IC: - switch(value->v.numValue) { + /* FALLTHROUGH added to suppress GCC warning due to + * -Wimplicit-fallthrough flag */ + switch (value->v.numValue) { case 2: here->HFETAicVGS = *(value->v.vec.rVec+1); here->HFETAicVGSGiven = TRUE; diff --git a/src/spicelib/devices/hfet2/hfet2param.c b/src/spicelib/devices/hfet2/hfet2param.c index 4d4e34169..3ceab0547 100644 --- a/src/spicelib/devices/hfet2/hfet2param.c +++ b/src/spicelib/devices/hfet2/hfet2param.c @@ -16,8 +16,8 @@ int HFET2param(int param, IFvalue *value, GENinstance *inst, IFvalue *select) HFET2instance *here = (HFET2instance*)inst; NG_IGNORE(select); - - switch(param) { + + switch (param) { case HFET2_LENGTH: L = value->rValue; here->HFET2lengthGiven = TRUE; @@ -34,7 +34,9 @@ int HFET2param(int param, IFvalue *value, GENinstance *inst, IFvalue *select) here->HFET2off = value->iValue; break; case HFET2_IC: - switch(value->v.numValue) { + /* FALLTHROUGH added to suppress GCC warning due to + * -Wimplicit-fallthrough flag */ + switch (value->v.numValue) { case 2: here->HFET2icVGS = *(value->v.vec.rVec+1); here->HFET2icVGSGiven = TRUE; diff --git a/src/spicelib/devices/hisim2/hsm2par.c b/src/spicelib/devices/hisim2/hsm2par.c index feee32092..62ae8cbee 100644 --- a/src/spicelib/devices/hisim2/hsm2par.c +++ b/src/spicelib/devices/hisim2/hsm2par.c @@ -133,15 +133,17 @@ int HSM2param( here->HSM2_icVGS_Given = TRUE; break; case HSM2_IC: + /* FALLTHROUGH added to suppress GCC warning due to + * -Wimplicit-fallthrough flag */ switch (value->v.numValue) { case 3: here->HSM2_icVBS = *(value->v.vec.rVec + 2); here->HSM2_icVBS_Given = TRUE; - /* FALLTHROUGH */ + /* FALLTHROUGH */ case 2: here->HSM2_icVGS = *(value->v.vec.rVec + 1); here->HSM2_icVGS_Given = TRUE; - /* FALLTHROUGH */ + /* FALLTHROUGH */ case 1: here->HSM2_icVDS = *(value->v.vec.rVec); here->HSM2_icVDS_Given = TRUE; diff --git a/src/spicelib/devices/hisimhv1/hsmhvpar.c b/src/spicelib/devices/hisimhv1/hsmhvpar.c index 35dd1d3b7..6571c02e4 100644 --- a/src/spicelib/devices/hisimhv1/hsmhvpar.c +++ b/src/spicelib/devices/hisimhv1/hsmhvpar.c @@ -102,11 +102,11 @@ int HSMHVparam( case 3: here->HSMHV_icVBS = *(value->v.vec.rVec + 2); here->HSMHV_icVBS_Given = TRUE; - /* FALLTHROUGH */ + /* FALLTHROUGH */ case 2: here->HSMHV_icVGS = *(value->v.vec.rVec + 1); here->HSMHV_icVGS_Given = TRUE; - /* FALLTHROUGH */ + /* FALLTHROUGH */ case 1: here->HSMHV_icVDS = *(value->v.vec.rVec); here->HSMHV_icVDS_Given = TRUE; diff --git a/src/spicelib/devices/hisimhv2/hsmhv2par.c b/src/spicelib/devices/hisimhv2/hsmhv2par.c index eb608d0ed..999426f29 100644 --- a/src/spicelib/devices/hisimhv2/hsmhv2par.c +++ b/src/spicelib/devices/hisimhv2/hsmhv2par.c @@ -140,15 +140,17 @@ int HSMHV2param( here->HSMHV2_icVGS_Given = TRUE; break; case HSMHV2_IC: + /* FALLTHROUGH added to suppress GCC warning due to + * -Wimplicit-fallthrough flag */ switch (value->v.numValue) { case 3: here->HSMHV2_icVBS = *(value->v.vec.rVec + 2); here->HSMHV2_icVBS_Given = TRUE; - /* FALLTHROUGH */ + /* FALLTHROUGH */ case 2: here->HSMHV2_icVGS = *(value->v.vec.rVec + 1); here->HSMHV2_icVGS_Given = TRUE; - /* FALLTHROUGH */ + /* FALLTHROUGH */ case 1: here->HSMHV2_icVDS = *(value->v.vec.rVec); here->HSMHV2_icVDS_Given = TRUE; diff --git a/src/spicelib/devices/isrc/isrcpar.c b/src/spicelib/devices/isrc/isrcpar.c index a80c08e23..f66b3bd03 100644 --- a/src/spicelib/devices/isrc/isrcpar.c +++ b/src/spicelib/devices/isrc/isrcpar.c @@ -38,7 +38,7 @@ ISRCparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) NG_IGNORE(select); - switch(param) { + switch (param) { case ISRC_DC: here->ISRCdcValue = value->rValue; @@ -63,7 +63,9 @@ ISRCparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) break; case ISRC_AC: - switch(value->v.numValue) { + /* FALLTHROUGH added to suppress GCC warning due to + * -Wimplicit-fallthrough flag */ + switch (value->v.numValue) { case 2: here->ISRCacPhase = *(value->v.vec.rVec+1); here->ISRCacPGiven = TRUE; diff --git a/src/spicelib/devices/jfet/jfetpar.c b/src/spicelib/devices/jfet/jfetpar.c index eefb0021e..64dae9f3d 100644 --- a/src/spicelib/devices/jfet/jfetpar.c +++ b/src/spicelib/devices/jfet/jfetpar.c @@ -21,7 +21,7 @@ JFETparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) NG_IGNORE(select); - switch(param) { + switch (param) { case JFET_TEMP: here->JFETtemp = value->rValue+CONSTCtoK; here->JFETtempGiven = TRUE; @@ -50,7 +50,9 @@ JFETparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) here->JFEToff = (value->iValue != 0); break; case JFET_IC: - switch(value->v.numValue) { + /* FALLTHROUGH added to suppress GCC warning due to + * -Wimplicit-fallthrough flag */ + switch (value->v.numValue) { case 2: here->JFETicVGS = *(value->v.vec.rVec+1); here->JFETicVGSGiven = TRUE; diff --git a/src/spicelib/devices/jfet2/jfet2par.c b/src/spicelib/devices/jfet2/jfet2par.c index e6191083a..44c6b9fc3 100644 --- a/src/spicelib/devices/jfet2/jfet2par.c +++ b/src/spicelib/devices/jfet2/jfet2par.c @@ -25,7 +25,7 @@ JFET2param(int param, IFvalue *value, GENinstance *inst, IFvalue *select) NG_IGNORE(select); - switch(param) { + switch (param) { case JFET2_TEMP: here->JFET2temp = value->rValue+CONSTCtoK; here->JFET2tempGiven = TRUE; @@ -54,7 +54,9 @@ JFET2param(int param, IFvalue *value, GENinstance *inst, IFvalue *select) here->JFET2off = (value->iValue != 0); break; case JFET2_IC: - switch(value->v.numValue) { + /* FALLTHROUGH added to suppress GCC warning due to + * -Wimplicit-fallthrough flag */ + switch (value->v.numValue) { case 2: here->JFET2icVGS = *(value->v.vec.rVec+1); here->JFET2icVGSGiven = TRUE; diff --git a/src/spicelib/devices/ltra/ltraload.c b/src/spicelib/devices/ltra/ltraload.c index 1a0c143c2..01e631b23 100644 --- a/src/spicelib/devices/ltra/ltraload.c +++ b/src/spicelib/devices/ltra/ltraload.c @@ -90,6 +90,8 @@ LTRAload(GENmodel *inModel, CKTcircuit *ckt) break; } + /* FALLTHROUGH added to suppress GCC warning due to + * -Wimplicit-fallthrough flag */ switch (model->LTRAspecialCase) { case LTRA_MOD_RLC: /* @@ -122,6 +124,7 @@ LTRAload(GENmodel *inModel, CKTcircuit *ckt) model->LTRAtd, model->LTRAalpha, model->LTRAbeta, ckt->CKTtime, ckt->CKTtimePoints, ckt->CKTtimeIndex, model->LTRAchopReltol, &(model->LTRAauxIndex)); + /* FALLTHROUGH */ case LTRA_MOD_LC: @@ -308,6 +311,7 @@ LTRAload(GENmodel *inModel, CKTcircuit *ckt) *(here->LTRAibr2Pos2Ptr) += dummy1; *(here->LTRAibr2Neg2Ptr) -= dummy1; /* end loading for convolution parts' first terms */ + /* FALLTHROUGH */ case LTRA_MOD_LC: /* @@ -591,6 +595,8 @@ LTRAload(GENmodel *inModel, CKTcircuit *ckt) return (E_BADPARM); } + /* FALLTHROUGH added to suppress GCC warning due to + * -Wimplicit-fallthrough flag */ switch (model->LTRAspecialCase) { case LTRA_MOD_RLC: @@ -701,6 +707,7 @@ LTRAload(GENmodel *inModel, CKTcircuit *ckt) /* end convolution of h3dash with v2 and v1 */ + /* FALLTHROUGH */ case LTRA_MOD_LC: /* begin lossless-like parts */ diff --git a/src/spicelib/devices/ltra/ltrapar.c b/src/spicelib/devices/ltra/ltrapar.c index 9cfeb5d52..78b2b0155 100644 --- a/src/spicelib/devices/ltra/ltrapar.c +++ b/src/spicelib/devices/ltra/ltrapar.c @@ -39,13 +39,13 @@ LTRAparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) switch (value->v.numValue) { case 4: here->LTRAinitCur2 = *(value->v.vec.rVec + 3); - /* FALLTHROUGH */ + /* FALLTHROUGH */ case 3: here->LTRAinitVolt2 = *(value->v.vec.rVec + 2); - /* FALLTHROUGH */ + /* FALLTHROUGH */ case 2: here->LTRAinitCur1 = *(value->v.vec.rVec + 1); - /* FALLTHROUGH */ + /* FALLTHROUGH */ case 1: here->LTRAinitVolt1 = *(value->v.vec.rVec); break; diff --git a/src/spicelib/devices/mes/mesparam.c b/src/spicelib/devices/mes/mesparam.c index 009e7a47a..d6bd06a6c 100644 --- a/src/spicelib/devices/mes/mesparam.c +++ b/src/spicelib/devices/mes/mesparam.c @@ -20,7 +20,7 @@ MESparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) NG_IGNORE(select); - switch(param) { + switch (param) { case MES_AREA: here->MESarea = value->rValue; here->MESareaGiven = TRUE; @@ -41,7 +41,9 @@ MESparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) here->MESoff = value->iValue; break; case MES_IC: - switch(value->v.numValue) { + /* FALLTHROUGH added to suppress GCC warning due to + * -Wimplicit-fallthrough flag */ + switch (value->v.numValue) { case 2: here->MESicVGS = *(value->v.vec.rVec+1); here->MESicVGSGiven = TRUE; diff --git a/src/spicelib/devices/mesa/mesaparam.c b/src/spicelib/devices/mesa/mesaparam.c index 9fd593310..98ab7f138 100644 --- a/src/spicelib/devices/mesa/mesaparam.c +++ b/src/spicelib/devices/mesa/mesaparam.c @@ -19,7 +19,7 @@ MESAparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) NG_IGNORE(select); - switch(param) { + switch (param) { case MESA_LENGTH: here->MESAlength = value->rValue; here->MESAlengthGiven = TRUE; @@ -45,7 +45,9 @@ MESAparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) here->MESAoff = value->iValue; break; case MESA_IC: - switch(value->v.numValue) { + /* FALLTHROUGH added to suppress GCC warning due to + * -Wimplicit-fallthrough flag */ + switch (value->v.numValue) { case 2: here->MESAicVGS = *(value->v.vec.rVec+1); here->MESAicVGSGiven = TRUE; diff --git a/src/spicelib/devices/mos1/mos1par.c b/src/spicelib/devices/mos1/mos1par.c index 70c479560..07c3a5ddd 100644 --- a/src/spicelib/devices/mos1/mos1par.c +++ b/src/spicelib/devices/mos1/mos1par.c @@ -28,7 +28,7 @@ MOS1param(int param, IFvalue *value, GENinstance *inst, IFvalue *select) if (!cp_getvar("scale", CP_REAL, &scale, 0)) scale = 1; - switch(param) { + switch (param) { case MOS1_TEMP: here->MOS1temp = value->rValue+CONSTCtoK; here->MOS1tempGiven = TRUE; @@ -89,7 +89,9 @@ MOS1param(int param, IFvalue *value, GENinstance *inst, IFvalue *select) here->MOS1icVGSGiven = TRUE; break; case MOS1_IC: - switch(value->v.numValue){ + /* FALLTHROUGH added to suppress GCC warning due to + * -Wimplicit-fallthrough flag */ + switch (value->v.numValue) { case 3: here->MOS1icVBS = *(value->v.vec.rVec+2); here->MOS1icVBSGiven = TRUE; diff --git a/src/spicelib/devices/mos2/mos2dset.c b/src/spicelib/devices/mos2/mos2dset.c index 600fa354a..a6459b63a 100644 --- a/src/spicelib/devices/mos2/mos2dset.c +++ b/src/spicelib/devices/mos2/mos2dset.c @@ -193,8 +193,8 @@ MOS2dSetup(GENmodel *inModel, CKTcircuit *ckt) * this routine evaluates the drain current, its derivatives and * the charges associated with the gate, channel and bulk * for mosfets * */ - double arg; - double sarg; + double arg1; + double sarg1; double a4[4],b4[4],x4[8],poly4[8]; double beta1; double sphi = 0.0; /* square root of phi */ @@ -358,22 +358,22 @@ d_p.d3_pqr = 0.0; d_phiMinVbs.d1_q = - d_phiMinVbs.d1_q; if (lvbs <= 0.0) { - sarg = sqrt(phiMinVbs); + sarg1 = sqrt(phiMinVbs); SqrtDeriv(&d_sarg, &d_phiMinVbs); - dsrgdb = -0.5/sarg; + dsrgdb = -0.5/sarg1; InvDeriv(&d_dsrgdb,&d_sarg); TimesDeriv(&d_dsrgdb,&d_dsrgdb,-0.5); } else { sphi = sqrt(here->MOS2tPhi); /*const*/ sphi3 = here->MOS2tPhi*sphi; /*const*/ - sarg = sphi/(1.0+0.5*lvbs/here->MOS2tPhi); + sarg1 = sphi/(1.0+0.5*lvbs/here->MOS2tPhi); EqualDeriv(&d_sarg,&d_q); d_sarg.value = lvbs; TimesDeriv(&d_sarg,&d_sarg,0.5/here->MOS2tPhi); d_sarg.value += 1.0; InvDeriv(&d_sarg,&d_sarg); TimesDeriv(&d_sarg,&d_sarg,sphi); - dsrgdb = -0.5*sarg*sarg/sphi3; + dsrgdb = -0.5*sarg1*sarg1/sphi3; MultDeriv(&d_dsrgdb,&d_sarg,&d_sarg); TimesDeriv(&d_dsrgdb,&d_dsrgdb,-0.5/sphi3); /* tmp = sarg/sphi3; */ @@ -422,7 +422,7 @@ d_p.d3_pqr = 0.0; if ((model->MOS2gamma > 0.0) || (model->MOS2substrateDoping > 0.0)) { xwd = model->MOS2xd*barg; - xws = model->MOS2xd*sarg; + xws = model->MOS2xd*sarg1; TimesDeriv(&d_xwd,&d_barg,model->MOS2xd); TimesDeriv(&d_xws,&d_sarg,model->MOS2xd); @@ -484,7 +484,7 @@ d_p.d3_pqr = 0.0; dgddvb = 0.0; EqualDeriv(&d_dgddvb,&d_zero); } - von = vbin+gamasd*sarg; + von = vbin+gamasd*sarg1; MultDeriv(&d_von,&d_gamasd,&d_sarg); PlusDeriv(&d_von,&d_von,&d_vbin); /* @@ -497,7 +497,7 @@ d_p.d3_pqr = 0.0; /* XXX constant per model */ cfs = CHARGE*model->MOS2fastSurfaceStateDensity* 1e4 /*(cm**2/m**2)*/; - cdonco = -(gamasd*dsrgdb + dgddvb*sarg) + factor; + cdonco = -(gamasd*dsrgdb + dgddvb*sarg1) + factor; MultDeriv(&d_dummy,&d_dgddvb,&d_sarg); MultDeriv(&d_cdonco,&d_gamasd,&d_dsrgdb); PlusDeriv(&d_cdonco,&d_cdonco,&d_dummy); @@ -533,7 +533,7 @@ d_p.d3_pqr = 0.0; /* * compute some more useful quantities */ - sarg3 = sarg*sarg*sarg; + sarg3 = sarg1*sarg1*sarg1; CubeDeriv(&d_sarg3,&d_sarg); /* XXX constant per model */ sbiarg = sqrt(here->MOS2tBulkPot); /*const*/ @@ -599,7 +599,7 @@ line500: vdsat = 0.0; EqualDeriv(&d_vdsat,&d_zero); } else { - arg = sqrt(1.0+4.0*argv/gammd2); + arg1 = sqrt(1.0+4.0*argv/gammd2); DivDeriv(&d_arg,&d_argv,&d_gammd2); TimesDeriv(&d_arg,&d_arg,4.0);d_arg.value += 1.0; SqrtDeriv(&d_arg,&d_arg); @@ -883,14 +883,14 @@ line500: MultDeriv(&d_sargv,&d_argv,&d_argv); d_sargv.value += 1.0; SqrtDeriv(&d_sargv,&d_sargv); - arg = sqrt(argv+sargv); + arg1 = sqrt(argv+sargv); PlusDeriv(&d_arg,&d_sargv,&d_argv); SqrtDeriv(&d_arg,&d_arg); xlfact = model->MOS2xd/(EffectiveLength*lvds); EqualDeriv(&d_xlfact,&d_r); d_xlfact.value = lvds; InvDeriv(&d_xlfact,&d_xlfact); TimesDeriv(&d_xlfact,&d_xlfact,model->MOS2xd/EffectiveLength); - xlamda = xlfact*arg; + xlamda = xlfact*arg1; MultDeriv(&d_xlamda,&d_xlfact,&d_arg); } else { argv = (vgsx-vbin)/eta-vdsat; @@ -990,7 +990,7 @@ line610: goto line1050; } - here->MOS2gds = beta1*(von-vbin-gammad*sarg)*exp(argg* + here->MOS2gds = beta1*(von-vbin-gammad*sarg1)*exp(argg* (lvgs-von)); MultDeriv(&d_dummy,&d_gammad,&d_sarg); PlusDeriv(&d_dummy,&d_dummy,&d_vbin); @@ -1011,7 +1011,7 @@ line610: } - here->MOS2gds = beta1*(lvgs-vbin-gammad*sarg); + here->MOS2gds = beta1*(lvgs-vbin-gammad*sarg1); MultDeriv(&d_mos2gds,&d_gammad,&d_sarg); PlusDeriv(&d_mos2gds,&d_mos2gds,&d_vbin); TimesDeriv(&d_mos2gds,&d_mos2gds,-1.0); diff --git a/src/spicelib/devices/mos2/mos2par.c b/src/spicelib/devices/mos2/mos2par.c index c7d594eb2..732be5471 100644 --- a/src/spicelib/devices/mos2/mos2par.c +++ b/src/spicelib/devices/mos2/mos2par.c @@ -29,7 +29,7 @@ MOS2param(int param, IFvalue *value, GENinstance *inst, if (!cp_getvar("scale", CP_REAL, &scale, 0)) scale = 1; - switch(param) { + switch (param) { case MOS2_TEMP: here->MOS2temp = value->rValue+CONSTCtoK; here->MOS2tempGiven = TRUE; @@ -90,7 +90,9 @@ MOS2param(int param, IFvalue *value, GENinstance *inst, here->MOS2icVGSGiven = TRUE; break; case MOS2_IC: - switch(value->v.numValue){ + /* FALLTHROUGH added to suppress GCC warning due to + * -Wimplicit-fallthrough flag */ + switch (value->v.numValue) { case 3: here->MOS2icVBS = *(value->v.vec.rVec+2); here->MOS2icVBSGiven = TRUE; diff --git a/src/spicelib/devices/mos3/mos3par.c b/src/spicelib/devices/mos3/mos3par.c index 20fed040d..725700a90 100644 --- a/src/spicelib/devices/mos3/mos3par.c +++ b/src/spicelib/devices/mos3/mos3par.c @@ -28,8 +28,7 @@ MOS3param(int param, IFvalue *value, GENinstance *inst, IFvalue *select) if (!cp_getvar("scale", CP_REAL, &scale, 0)) scale = 1; - switch(param) { - + switch (param) { case MOS3_M: here->MOS3m = value->rValue; here->MOS3mGiven = TRUE; @@ -90,7 +89,9 @@ MOS3param(int param, IFvalue *value, GENinstance *inst, IFvalue *select) here->MOS3dtempGiven = TRUE; break; case MOS3_IC: - switch(value->v.numValue){ + /* FALLTHROUGH added to suppress GCC warning due to + * -Wimplicit-fallthrough flag */ + switch (value->v.numValue) { case 3: here->MOS3icVBS = *(value->v.vec.rVec+2); here->MOS3icVBSGiven = TRUE; diff --git a/src/spicelib/devices/mos6/mos6par.c b/src/spicelib/devices/mos6/mos6par.c index 22a56351e..a26d76248 100644 --- a/src/spicelib/devices/mos6/mos6par.c +++ b/src/spicelib/devices/mos6/mos6par.c @@ -21,7 +21,7 @@ MOS6param(int param, IFvalue *value, GENinstance *inst, IFvalue *select) NG_IGNORE(select); - switch(param) { + switch (param) { case MOS6_TEMP: here->MOS6temp = value->rValue+CONSTCtoK; here->MOS6tempGiven = TRUE; @@ -82,7 +82,9 @@ MOS6param(int param, IFvalue *value, GENinstance *inst, IFvalue *select) here->MOS6icVGSGiven = TRUE; break; case MOS6_IC: - switch(value->v.numValue){ + /* FALLTHROUGH added to suppress GCC warning due to + * -Wimplicit-fallthrough flag */ + switch (value->v.numValue) { case 3: here->MOS6icVBS = *(value->v.vec.rVec+2); here->MOS6icVBSGiven = TRUE; diff --git a/src/spicelib/devices/mos9/mos9par.c b/src/spicelib/devices/mos9/mos9par.c index 3deb06626..f31fa4ff5 100644 --- a/src/spicelib/devices/mos9/mos9par.c +++ b/src/spicelib/devices/mos9/mos9par.c @@ -23,8 +23,7 @@ MOS9param(int param, IFvalue *value, GENinstance *inst, NG_IGNORE(select); - switch(param) { - + switch (param) { case MOS9_M: here->MOS9m = value->rValue; here->MOS9mGiven = TRUE; @@ -85,7 +84,9 @@ MOS9param(int param, IFvalue *value, GENinstance *inst, here->MOS9dtempGiven = TRUE; break; case MOS9_IC: - switch(value->v.numValue){ + /* FALLTHROUGH added to suppress GCC warning due to + * -Wimplicit-fallthrough flag */ + switch (value->v.numValue) { case 3: here->MOS9icVBS = *(value->v.vec.rVec+2); here->MOS9icVBSGiven = TRUE; diff --git a/src/spicelib/devices/soi3/soi3par.c b/src/spicelib/devices/soi3/soi3par.c index 5b087c8bd..7650d1fd3 100644 --- a/src/spicelib/devices/soi3/soi3par.c +++ b/src/spicelib/devices/soi3/soi3par.c @@ -36,7 +36,7 @@ SOI3param(int param, IFvalue *value, GENinstance *inst, IFvalue *select) NG_IGNORE(select); - switch(param) { + switch (param) { case SOI3_L: here->SOI3l = value->rValue; here->SOI3lGiven = TRUE; @@ -133,7 +133,9 @@ SOI3param(int param, IFvalue *value, GENinstance *inst, IFvalue *select) here->SOI3ct4Given = TRUE; break; case SOI3_IC: - switch(value->v.numValue){ + /* FALLTHROUGH added to suppress GCC warning due to + * -Wimplicit-fallthrough flag */ + switch (value->v.numValue) { case 4: here->SOI3icVBS = *(value->v.vec.rVec+3); here->SOI3icVBSGiven = TRUE; diff --git a/src/spicelib/devices/tra/traparam.c b/src/spicelib/devices/tra/traparam.c index 88fe0bec8..7f302feb8 100644 --- a/src/spicelib/devices/tra/traparam.c +++ b/src/spicelib/devices/tra/traparam.c @@ -20,7 +20,7 @@ TRAparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) NG_IGNORE(select); - switch(param) { + switch (param) { case TRA_RELTOL: here->TRAreltol = value->rValue; here->TRAreltolGiven = TRUE; @@ -62,7 +62,9 @@ TRAparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) here->TRAicC2Given = TRUE; break; case TRA_IC: - switch(value->v.numValue){ + /* FALLTHROUGH ded to suppress GCC warning due to + * -Wimplicit-fallthrough flag */ + switch (value->v.numValue) { case 4: here->TRAinitCur2 = *(value->v.vec.rVec+3); /* FALLTHROUGH */ diff --git a/src/spicelib/devices/vbic/vbicparam.c b/src/spicelib/devices/vbic/vbicparam.c index 20523c92d..5ffea4cc4 100644 --- a/src/spicelib/devices/vbic/vbicparam.c +++ b/src/spicelib/devices/vbic/vbicparam.c @@ -26,7 +26,7 @@ VBICparam(int param, IFvalue *value, GENinstance *instPtr, IFvalue *select) NG_IGNORE(select); - switch(param) { + switch (param) { case VBIC_AREA: here->VBICarea = value->rValue; here->VBICareaGiven = TRUE; @@ -55,7 +55,9 @@ VBICparam(int param, IFvalue *value, GENinstance *instPtr, IFvalue *select) here->VBICmGiven = TRUE; break; case VBIC_IC : - switch(value->v.numValue) { + /* FALLTHROUGH added to suppress GCC warning due to + * -Wimplicit-fallthrough flag */ + switch (value->v.numValue) { case 2: here->VBICicVCE = *(value->v.vec.rVec+1); here->VBICicVCEGiven = TRUE; diff --git a/src/spicelib/devices/vdmos/vdmospar.c b/src/spicelib/devices/vdmos/vdmospar.c index 9e97a147e..f3c1deb7d 100644 --- a/src/spicelib/devices/vdmos/vdmospar.c +++ b/src/spicelib/devices/vdmos/vdmospar.c @@ -29,7 +29,7 @@ VDMOSparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) if (!cp_getvar("scale", CP_REAL, &scale, 0)) scale = 1; - switch(param) { + switch (param) { case VDMOS_TEMP: here->VDMOStemp = value->rValue+CONSTCtoK; here->VDMOStempGiven = TRUE; @@ -58,7 +58,9 @@ VDMOSparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) here->VDMOSthermalGiven = TRUE; break; case VDMOS_IC: - switch(value->v.numValue){ + /* FALLTHROUGH added to suppress GCC warning due to + * -Wimplicit-fallthrough flag */ + switch (value->v.numValue) { case 2: here->VDMOSicVGS = *(value->v.vec.rVec+1); here->VDMOSicVGSGiven = TRUE; diff --git a/src/spicelib/devices/vsrc/vsrcpar.c b/src/spicelib/devices/vsrc/vsrcpar.c index e30c45925..ccc7c5462 100644 --- a/src/spicelib/devices/vsrc/vsrcpar.c +++ b/src/spicelib/devices/vsrc/vsrcpar.c @@ -38,8 +38,7 @@ VSRCparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) NG_IGNORE(select); - switch(param) { - + switch (param) { case VSRC_DC: here->VSRCdcValue = value->rValue; here->VSRCdcGiven = TRUE; @@ -58,7 +57,9 @@ VSRCparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) break; case VSRC_AC: - switch(value->v.numValue) { + /* FALLTHROUGH added to suppress GCC warning due to + * -Wimplicit-fallthrough flag */ + switch (value->v.numValue) { case 2: here->VSRCacPhase = *(value->v.vec.rVec+1); here->VSRCacPGiven = TRUE; @@ -163,7 +164,7 @@ VSRCparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) case VSRC_D_F1: here->VSRCdF1given = TRUE; here->VSRCdGiven = TRUE; - switch(value->v.numValue) { + switch (value->v.numValue) { case 2: here->VSRCdF1phase = *(value->v.vec.rVec+1); here->VSRCdF1mag = *(value->v.vec.rVec); @@ -184,7 +185,7 @@ VSRCparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) case VSRC_D_F2: here->VSRCdF2given = TRUE; here->VSRCdGiven = TRUE; - switch(value->v.numValue) { + switch (value->v.numValue) { case 2: here->VSRCdF2phase = *(value->v.vec.rVec+1); here->VSRCdF2mag = *(value->v.vec.rVec);