Cleanup of a number of uninitialized variable issues flagged by
the compiler. Some are obscure functions (plot verstatec hasn't been used in years) but others (like SPICE distributed junctions) are potentially significant sources of unexpected crashes on systems that don't zero uninitialized memory.
This commit is contained in:
parent
53078588ae
commit
547f0448d9
|
|
@ -365,9 +365,8 @@ CalmaWrite(rootDef, f)
|
|||
*/
|
||||
|
||||
bool
|
||||
calmaDumpStructure(def, cellstart, outf, calmaDefHash, filename)
|
||||
calmaDumpStructure(def, outf, calmaDefHash, filename)
|
||||
CellDef *def;
|
||||
off_t cellstart;
|
||||
FILE *outf;
|
||||
HashTable *calmaDefHash;
|
||||
char *filename;
|
||||
|
|
@ -593,10 +592,9 @@ syntaxerror:
|
|||
*/
|
||||
|
||||
void
|
||||
calmaFullDump(def, fi, cellstart, outf, filename)
|
||||
calmaFullDump(def, fi, outf, filename)
|
||||
CellDef *def;
|
||||
FILE *fi;
|
||||
off_t cellstart;
|
||||
FILE *outf;
|
||||
char *filename;
|
||||
{
|
||||
|
|
@ -659,7 +657,7 @@ calmaFullDump(def, fi, cellstart, outf, filename)
|
|||
}
|
||||
HashSetValue(he, StrDup(NULL, uniqlibname));
|
||||
|
||||
while (calmaDumpStructure(def, cellstart, outf, &calmaDefHash, filename))
|
||||
while (calmaDumpStructure(def, outf, &calmaDefHash, filename))
|
||||
if (SigInterruptPending)
|
||||
goto done;
|
||||
calmaSkipExact(CALMA_ENDLIB);
|
||||
|
|
@ -813,7 +811,7 @@ calmaProcessDef(def, outf)
|
|||
|
||||
he = HashLookOnly(&calmaLibHash, retfilename);
|
||||
if (he == NULL)
|
||||
calmaFullDump(def, fi, cellstart, outf, retfilename);
|
||||
calmaFullDump(def, fi, outf, retfilename);
|
||||
|
||||
fclose(fi);
|
||||
def->cd_flags |= CDVENDORGDS;
|
||||
|
|
|
|||
|
|
@ -2159,9 +2159,9 @@ drcSpacing(argc, argv)
|
|||
}
|
||||
else
|
||||
{
|
||||
runlength = distance;
|
||||
layers2 = argv[3];
|
||||
distance = atoi(argv[4]);
|
||||
runlength = distance;
|
||||
adjacency = argv[5];
|
||||
why = drcWhyDup(argv[6]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -182,6 +182,7 @@ spcHierWriteParams(hc, dev, scale, l, w, sdM)
|
|||
// For parameter an followed by parameter pn,
|
||||
// process both at the same time
|
||||
|
||||
sdM = getCurDevMult();
|
||||
if (plist->parm_next && plist->parm_next->parm_type[0] ==
|
||||
'p' && plist->parm_next->parm_type[1] ==
|
||||
plist->parm_type[1])
|
||||
|
|
@ -228,6 +229,7 @@ spcHierWriteParams(hc, dev, scale, l, w, sdM)
|
|||
// For parameter pn followed by parameter an,
|
||||
// process both at the same time
|
||||
|
||||
sdM = getCurDevMult();
|
||||
if (plist->parm_next && plist->parm_next->parm_type[0] ==
|
||||
'a' && plist->parm_next->parm_type[1] ==
|
||||
plist->parm_type[1])
|
||||
|
|
|
|||
|
|
@ -2335,6 +2335,7 @@ spcdevVisit(dev, hierName, scale, trans)
|
|||
name, esSpiceF);
|
||||
|
||||
fprintf(esSpiceF, " %s", EFDevTypes[dev->dev_type]);
|
||||
sdM = getCurDevMult();
|
||||
spcWriteParams(dev, hierName, scale, l, w, sdM);
|
||||
break;
|
||||
|
||||
|
|
@ -3796,8 +3797,8 @@ devDistJunctVisit(dev, hierName, scale, trans)
|
|||
return 0;
|
||||
}
|
||||
|
||||
w = (int)((float)w * scale);
|
||||
EFGetLengthAndWidth(dev, &l, &w);
|
||||
w = (int)((float)w * scale);
|
||||
|
||||
for (i = 1; i<dev->dev_nterm; i++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -196,6 +196,7 @@ PlotFreeRaster(raster)
|
|||
* have been created with PlotNewRaster.
|
||||
*/
|
||||
{
|
||||
if (raster == NULL) return;
|
||||
freeMagic((char *) raster->ras_bits);
|
||||
freeMagic((char *) raster);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1084,7 +1084,7 @@ PlotVersatec(scx, layers, xMask, user_scale)
|
|||
Raster *raster = NULL;
|
||||
|
||||
/* CMYK color separated raster buffers. */
|
||||
Raster *kRaster, *cRaster, *mRaster, *yRaster;
|
||||
Raster *kRaster = NULL, *cRaster = NULL, *mRaster = NULL, *yRaster = NULL;
|
||||
|
||||
haveColorMessage = FALSE;
|
||||
GeoTransRect(&scx->scx_trans, &scx->scx_area, &rootClip);
|
||||
|
|
|
|||
|
|
@ -310,6 +310,7 @@ RtrChannelObstacles(use, ch)
|
|||
scx.scx_area.r_ytop += w * RtrGridSpacing + down;
|
||||
scx.scx_use = use;
|
||||
scx.scx_trans = GeoIdentityTransform;
|
||||
TTMaskZero(&allObs);
|
||||
TTMaskSetMask3(&allObs, &RtrMetalObstacles, &RtrPolyObstacles);
|
||||
(void) DBTreeSrTiles(&scx, &allObs, 0, rtrChannelObstacleMark, (ClientData) ch);
|
||||
|
||||
|
|
|
|||
|
|
@ -1232,8 +1232,8 @@ selACPaintFunc2(tile, selACarg)
|
|||
Rect rrect, orect;
|
||||
int np, i, j;
|
||||
|
||||
ttype = (selACarg->ttype & TT_SIDE) ? ((ttype & TT_RIGHTMASK) >> 14) :
|
||||
ttype & TT_LEFTMASK;
|
||||
ttype = (selACarg->ttype & TT_SIDE) ? ((selACarg->ttype & TT_RIGHTMASK) >> 14) :
|
||||
selACarg->ttype & TT_LEFTMASK;
|
||||
|
||||
if (type & TT_DIAGONAL)
|
||||
rtype = (type & TT_SIDE) ? SplitRightType(tile) :
|
||||
|
|
|
|||
Loading…
Reference in New Issue