swallow type conversion warnings (assignment of an int to unsigned:1 flags)
This commit is contained in:
parent
7ef6155ea5
commit
bda8dfa2c6
24
ChangeLog
24
ChangeLog
|
|
@ -1,3 +1,25 @@
|
||||||
|
2010-11-23 Robert Larice
|
||||||
|
* src/spicelib/analysis/cktsopt.c ,
|
||||||
|
* src/spicelib/analysis/dctrcurv.c ,
|
||||||
|
* src/spicelib/devices/bjt/bjtparam.c ,
|
||||||
|
* src/spicelib/devices/bjt2/bjt2param.c ,
|
||||||
|
* src/spicelib/devices/bsim2/b2mpar.c ,
|
||||||
|
* src/spicelib/devices/dio/dioparam.c ,
|
||||||
|
* src/spicelib/devices/jfet/jfetpar.c ,
|
||||||
|
* src/spicelib/devices/jfet2/jfet2par.c ,
|
||||||
|
* src/spicelib/devices/mos1/mos1par.c ,
|
||||||
|
* src/spicelib/devices/mos2/mos2par.c ,
|
||||||
|
* src/spicelib/devices/mos3/mos3par.c ,
|
||||||
|
* src/spicelib/devices/mos6/mos6par.c ,
|
||||||
|
* src/spicelib/devices/mos9/mos9par.c ,
|
||||||
|
* src/spicelib/devices/soi3/soi3par.c ,
|
||||||
|
* src/spicelib/devices/vbic/vbicparam.c :
|
||||||
|
swallow type conversion warnings (assignment of int to unsigned:1 flags)
|
||||||
|
actually this fix changes the semantic from
|
||||||
|
true if and only if given number is odd
|
||||||
|
to
|
||||||
|
true if and only if given number != 0
|
||||||
|
|
||||||
2010-11-22 Robert Larice
|
2010-11-22 Robert Larice
|
||||||
* src/frontend/parse-bison.c ,
|
* src/frontend/parse-bison.c ,
|
||||||
* src/spicelib/parser/inpptree-parser.c :
|
* src/spicelib/parser/inpptree-parser.c :
|
||||||
|
|
@ -19,7 +41,7 @@
|
||||||
This phenomenon is well known, see for example
|
This phenomenon is well known, see for example
|
||||||
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=323
|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=323
|
||||||
This `bug workaround' fixes the problem
|
This `bug workaround' fixes the problem
|
||||||
by declaring the `test_double' to be a `void' double,
|
by declaring the `test_double' to be a `volatile' double,
|
||||||
which enforces truncation of the 80bit value,
|
which enforces truncation of the 80bit value,
|
||||||
when it is used in the comparison.
|
when it is used in the comparison.
|
||||||
This fix will cause the test-case to pass.
|
This fix will cause the test-case to pass.
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ CKTsetOpt(CKTcircuit *ckt, JOB *anal, int opt, IFvalue *val)
|
||||||
switch(opt) {
|
switch(opt) {
|
||||||
|
|
||||||
case OPT_NOOPITER:
|
case OPT_NOOPITER:
|
||||||
task->TSKnoOpIter = val->iValue;
|
task->TSKnoOpIter = (val->iValue != 0);
|
||||||
break;
|
break;
|
||||||
case OPT_GMIN:
|
case OPT_GMIN:
|
||||||
task->TSKgmin = val->rValue;
|
task->TSKgmin = val->rValue;
|
||||||
|
|
@ -125,7 +125,7 @@ CKTsetOpt(CKTcircuit *ckt, JOB *anal, int opt, IFvalue *val)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OPT_OLDLIMIT:
|
case OPT_OLDLIMIT:
|
||||||
task->TSKfixLimit = val->iValue;
|
task->TSKfixLimit = (val->iValue != 0);
|
||||||
break;
|
break;
|
||||||
case OPT_MINBREAK:
|
case OPT_MINBREAK:
|
||||||
task->TSKminBreak = val->rValue;
|
task->TSKminBreak = val->rValue;
|
||||||
|
|
@ -138,19 +138,19 @@ CKTsetOpt(CKTcircuit *ckt, JOB *anal, int opt, IFvalue *val)
|
||||||
else return(E_METHOD);
|
else return(E_METHOD);
|
||||||
break;
|
break;
|
||||||
case OPT_TRYTOCOMPACT:
|
case OPT_TRYTOCOMPACT:
|
||||||
task->TSKtryToCompact = val->iValue;
|
task->TSKtryToCompact = (val->iValue != 0);
|
||||||
break;
|
break;
|
||||||
case OPT_BADMOS3:
|
case OPT_BADMOS3:
|
||||||
task->TSKbadMos3 = val->iValue;
|
task->TSKbadMos3 = (val->iValue != 0);
|
||||||
break;
|
break;
|
||||||
case OPT_KEEPOPINFO:
|
case OPT_KEEPOPINFO:
|
||||||
task->TSKkeepOpInfo = val->iValue;
|
task->TSKkeepOpInfo = (val->iValue != 0);
|
||||||
break;
|
break;
|
||||||
case OPT_COPYNODESETS:
|
case OPT_COPYNODESETS:
|
||||||
task->TSKcopyNodesets = val->iValue;
|
task->TSKcopyNodesets = (val->iValue != 0);
|
||||||
break;
|
break;
|
||||||
case OPT_NODEDAMPING:
|
case OPT_NODEDAMPING:
|
||||||
task->TSKnodeDamping = val->iValue;
|
task->TSKnodeDamping = (val->iValue != 0);
|
||||||
break;
|
break;
|
||||||
case OPT_ABSDV:
|
case OPT_ABSDV:
|
||||||
task->TSKabsDv = val->rValue;
|
task->TSKabsDv = val->rValue;
|
||||||
|
|
|
||||||
|
|
@ -527,11 +527,11 @@ nextstep:;
|
||||||
if(cv->TRCVvType[i] == vcode) { /* voltage source */
|
if(cv->TRCVvType[i] == vcode) { /* voltage source */
|
||||||
((VSRCinstance*)(cv->TRCVvElt[i]))->VSRCdcValue =
|
((VSRCinstance*)(cv->TRCVvElt[i]))->VSRCdcValue =
|
||||||
cv->TRCVvSave[i];
|
cv->TRCVvSave[i];
|
||||||
((VSRCinstance*)(cv->TRCVvElt[i]))->VSRCdcGiven = cv->TRCVgSave[i];
|
((VSRCinstance*)(cv->TRCVvElt[i]))->VSRCdcGiven = (cv->TRCVgSave[i] != 0);
|
||||||
} else if(cv->TRCVvType[i] == icode) /*current source */ {
|
} else if(cv->TRCVvType[i] == icode) /*current source */ {
|
||||||
((ISRCinstance*)(cv->TRCVvElt[i]))->ISRCdcValue =
|
((ISRCinstance*)(cv->TRCVvElt[i]))->ISRCdcValue =
|
||||||
cv->TRCVvSave[i];
|
cv->TRCVvSave[i];
|
||||||
((ISRCinstance*)(cv->TRCVvElt[i]))->ISRCdcGiven = cv->TRCVgSave[i];
|
((ISRCinstance*)(cv->TRCVvElt[i]))->ISRCdcGiven = (cv->TRCVgSave[i] != 0);
|
||||||
} else if(cv->TRCVvType[i] == rcode) /* Resistance */ {
|
} else if(cv->TRCVvType[i] == rcode) /* Resistance */ {
|
||||||
((RESinstance*)(cv->TRCVvElt[i]))->RESresist =
|
((RESinstance*)(cv->TRCVvElt[i]))->RESresist =
|
||||||
cv->TRCVvSave[i];
|
cv->TRCVvSave[i];
|
||||||
|
|
@ -539,7 +539,7 @@ nextstep:;
|
||||||
((RESinstance*)(cv->TRCVvElt[i]))->RESconduct =
|
((RESinstance*)(cv->TRCVvElt[i]))->RESconduct =
|
||||||
1/(((RESinstance*)(cv->TRCVvElt[i]))->RESresist);
|
1/(((RESinstance*)(cv->TRCVvElt[i]))->RESresist);
|
||||||
|
|
||||||
((RESinstance*)(cv->TRCVvElt[i]))->RESresGiven = cv->TRCVgSave[i];
|
((RESinstance*)(cv->TRCVvElt[i]))->RESresGiven = (cv->TRCVgSave[i] != 0);
|
||||||
DEVices[rcode]->DEVload(cv->TRCVvElt[i]->GENmodPtr, ckt);
|
DEVices[rcode]->DEVload(cv->TRCVvElt[i]->GENmodPtr, ckt);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ BJTparam(int param, IFvalue *value, GENinstance *instPtr, IFvalue *select)
|
||||||
here->BJTdtempGiven = TRUE;
|
here->BJTdtempGiven = TRUE;
|
||||||
break;
|
break;
|
||||||
case BJT_OFF:
|
case BJT_OFF:
|
||||||
here->BJToff = value->iValue;
|
here->BJToff = (value->iValue != 0);
|
||||||
break;
|
break;
|
||||||
case BJT_IC_VBE:
|
case BJT_IC_VBE:
|
||||||
here->BJTicVBE = value->rValue;
|
here->BJTicVBE = value->rValue;
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ BJT2param(int param, IFvalue *value, GENinstance *instPtr, IFvalue *select)
|
||||||
here->BJT2dtempGiven = TRUE;
|
here->BJT2dtempGiven = TRUE;
|
||||||
break;
|
break;
|
||||||
case BJT2_OFF:
|
case BJT2_OFF:
|
||||||
here->BJT2off = value->iValue;
|
here->BJT2off = (value->iValue != 0);
|
||||||
break;
|
break;
|
||||||
case BJT2_IC_VBE:
|
case BJT2_IC_VBE:
|
||||||
here->BJT2icVBE = value->rValue;
|
here->BJT2icVBE = value->rValue;
|
||||||
|
|
|
||||||
|
|
@ -506,7 +506,7 @@ B2mParam(int param, IFvalue *value, GENmodel *inMod)
|
||||||
mod->B2gateBulkOverlapCapGiven = TRUE;
|
mod->B2gateBulkOverlapCapGiven = TRUE;
|
||||||
break;
|
break;
|
||||||
case BSIM2_MOD_XPART :
|
case BSIM2_MOD_XPART :
|
||||||
mod->B2channelChargePartitionFlag = value->iValue;
|
mod->B2channelChargePartitionFlag = (value->iValue != 0);
|
||||||
mod->B2channelChargePartitionFlagGiven = TRUE;
|
mod->B2channelChargePartitionFlagGiven = TRUE;
|
||||||
break;
|
break;
|
||||||
case BSIM2_MOD_RSH :
|
case BSIM2_MOD_RSH :
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ DIOparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
|
||||||
here->DIOdtempGiven = TRUE;
|
here->DIOdtempGiven = TRUE;
|
||||||
break;
|
break;
|
||||||
case DIO_OFF:
|
case DIO_OFF:
|
||||||
here->DIOoff = value->iValue;
|
here->DIOoff = (value->iValue != 0);
|
||||||
break;
|
break;
|
||||||
case DIO_IC:
|
case DIO_IC:
|
||||||
here->DIOinitCond = value->rValue;
|
here->DIOinitCond = value->rValue;
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ JFETparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
|
||||||
here->JFETicVGSGiven = TRUE;
|
here->JFETicVGSGiven = TRUE;
|
||||||
break;
|
break;
|
||||||
case JFET_OFF:
|
case JFET_OFF:
|
||||||
here->JFEToff = value->iValue;
|
here->JFEToff = (value->iValue != 0);
|
||||||
break;
|
break;
|
||||||
case JFET_IC:
|
case JFET_IC:
|
||||||
switch(value->v.numValue) {
|
switch(value->v.numValue) {
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ JFET2param(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
|
||||||
here->JFET2icVGSGiven = TRUE;
|
here->JFET2icVGSGiven = TRUE;
|
||||||
break;
|
break;
|
||||||
case JFET2_OFF:
|
case JFET2_OFF:
|
||||||
here->JFET2off = value->iValue;
|
here->JFET2off = (value->iValue != 0);
|
||||||
break;
|
break;
|
||||||
case JFET2_IC:
|
case JFET2_IC:
|
||||||
switch(value->v.numValue) {
|
switch(value->v.numValue) {
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ MOS1param(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
|
||||||
here->MOS1drainSquaresGiven = TRUE;
|
here->MOS1drainSquaresGiven = TRUE;
|
||||||
break;
|
break;
|
||||||
case MOS1_OFF:
|
case MOS1_OFF:
|
||||||
here->MOS1off = value->iValue;
|
here->MOS1off = (value->iValue != 0);
|
||||||
break;
|
break;
|
||||||
case MOS1_IC_VBS:
|
case MOS1_IC_VBS:
|
||||||
here->MOS1icVBS = value->rValue;
|
here->MOS1icVBS = value->rValue;
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ MOS2param(int param, IFvalue *value, GENinstance *inst,
|
||||||
here->MOS2drainSquaresGiven = TRUE;
|
here->MOS2drainSquaresGiven = TRUE;
|
||||||
break;
|
break;
|
||||||
case MOS2_OFF:
|
case MOS2_OFF:
|
||||||
here->MOS2off = value->iValue;
|
here->MOS2off = (value->iValue != 0);
|
||||||
break;
|
break;
|
||||||
case MOS2_IC_VBS:
|
case MOS2_IC_VBS:
|
||||||
here->MOS2icVBS = value->rValue;
|
here->MOS2icVBS = value->rValue;
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ MOS3param(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
|
||||||
here->MOS3drainSquaresGiven = TRUE;
|
here->MOS3drainSquaresGiven = TRUE;
|
||||||
break;
|
break;
|
||||||
case MOS3_OFF:
|
case MOS3_OFF:
|
||||||
here->MOS3off = value->iValue;
|
here->MOS3off = (value->iValue != 0);
|
||||||
break;
|
break;
|
||||||
case MOS3_IC_VBS:
|
case MOS3_IC_VBS:
|
||||||
here->MOS3icVBS = value->rValue;
|
here->MOS3icVBS = value->rValue;
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ MOS6param(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
|
||||||
here->MOS6drainSquaresGiven = TRUE;
|
here->MOS6drainSquaresGiven = TRUE;
|
||||||
break;
|
break;
|
||||||
case MOS6_OFF:
|
case MOS6_OFF:
|
||||||
here->MOS6off = value->iValue;
|
here->MOS6off = (value->iValue != 0);
|
||||||
break;
|
break;
|
||||||
case MOS6_IC_VBS:
|
case MOS6_IC_VBS:
|
||||||
here->MOS6icVBS = value->rValue;
|
here->MOS6icVBS = value->rValue;
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ MOS9param(int param, IFvalue *value, GENinstance *inst,
|
||||||
here->MOS9drainSquaresGiven = TRUE;
|
here->MOS9drainSquaresGiven = TRUE;
|
||||||
break;
|
break;
|
||||||
case MOS9_OFF:
|
case MOS9_OFF:
|
||||||
here->MOS9off = value->iValue;
|
here->MOS9off = (value->iValue != 0);
|
||||||
break;
|
break;
|
||||||
case MOS9_IC_VBS:
|
case MOS9_IC_VBS:
|
||||||
here->MOS9icVBS = value->rValue;
|
here->MOS9icVBS = value->rValue;
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ SOI3param(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
|
||||||
here->SOI3sourceSquaresGiven = TRUE;
|
here->SOI3sourceSquaresGiven = TRUE;
|
||||||
break;
|
break;
|
||||||
case SOI3_OFF:
|
case SOI3_OFF:
|
||||||
here->SOI3off = value->iValue;
|
here->SOI3off = (value->iValue != 0);
|
||||||
break;
|
break;
|
||||||
case SOI3_IC_VDS:
|
case SOI3_IC_VDS:
|
||||||
here->SOI3icVDS = value->rValue;
|
here->SOI3icVDS = value->rValue;
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ VBICparam(int param, IFvalue *value, GENinstance *instPtr, IFvalue *select)
|
||||||
here->VBICareaGiven = TRUE;
|
here->VBICareaGiven = TRUE;
|
||||||
break;
|
break;
|
||||||
case VBIC_OFF:
|
case VBIC_OFF:
|
||||||
here->VBICoff = value->iValue;
|
here->VBICoff = (value->iValue != 0);
|
||||||
break;
|
break;
|
||||||
case VBIC_IC_VBE:
|
case VBIC_IC_VBE:
|
||||||
here->VBICicVBE = value->rValue;
|
here->VBICicVBE = value->rValue;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue