Skip to content

Commit 7c9db2a

Browse files
committed
Remove some unused functions, and properly close a file handle that is fopened.
Signed-off-by: Christopher D. Leary <[email protected]>
1 parent 782eb87 commit 7c9db2a

File tree

3 files changed

+3
-28
lines changed

3 files changed

+3
-28
lines changed

src/rcx/src/extSpef.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,12 +1259,6 @@ uint extSpef::writeRes(uint netId, odb::dbSet<odb::dbRSeg>& rSet)
12591259
}
12601260
return cnt;
12611261
}
1262-
void getjxy(odb::dbNet* net, uint jid, Logger* logger)
1263-
{
1264-
int jx, jy;
1265-
net->getWire()->getCoord((int) jid, jx, jy);
1266-
logger->info(RCX, 174, "{}:{} {} {}", net->getId(), jid, jx, jy);
1267-
}
12681262
uint extSpef::writeNet(odb::dbNet* net, double resBound, uint debug)
12691263
{
12701264
_d_net = net;

src/rcx/src/extmain.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,15 +1226,6 @@ void extMain::printNet(dbNet* net, uint netId)
12261226
if (netId == net->getId())
12271227
net->printNetName(stdout);
12281228
}
1229-
bool IsDebugNets(dbNet* srcNet, dbNet* tgtNet, uint debugNetId)
1230-
{
1231-
if (srcNet != NULL && srcNet->getId() == debugNetId)
1232-
return true;
1233-
if (tgtNet != NULL && tgtNet->getId() == debugNetId)
1234-
return true;
1235-
1236-
return false;
1237-
}
12381229
void extMain::measureRC(CoupleOptions& options)
12391230
{
12401231
_totSegCnt++;
@@ -1393,11 +1384,6 @@ void extMain::measureRC(CoupleOptions& options)
13931384
}
13941385
ccReportProgress();
13951386
}
1396-
void extCompute(CoupleOptions& options, void* computePtr)
1397-
{
1398-
extMain* mmm = (extMain*) computePtr;
1399-
mmm->measureRC(options);
1400-
}
14011387
extern CoupleOptions coupleOptionsNull;
14021388

14031389
void extCompute1(CoupleOptions& options, void* computePtr)

src/rcx/src/netRC.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,13 +1116,6 @@ void extMain::removeExt()
11161116
}
11171117
removeExt(rnets);
11181118
}
1119-
void v_printWireNeighbor(void* ip,
1120-
uint met,
1121-
void* v_swire,
1122-
void* v_topNeighbor,
1123-
void* v_botNeighbor)
1124-
{
1125-
}
11261119
void extCompute(CoupleOptions& inputTable, void* extModel);
11271120
void extCompute1(CoupleOptions& inputTable, void* extModel);
11281121

@@ -1881,9 +1874,11 @@ bool extMain::setCorners(const char* rulesFileName, const char* cmp_file)
18811874
logger_->info(
18821875
RCX, 435, "Reading extraction model file {} ...", rulesFileName);
18831876

1884-
if (!fopen(rulesFileName, "r"))
1877+
FILE* rules_file = fopen(rulesFileName, "r");
1878+
if (rules_file == nullptr)
18851879
logger_->error(
18861880
RCX, 468, "Can't open extraction model file {}", rulesFileName);
1881+
fclose(rules_file);
18871882

18881883
if (!(m->readRules((char*) rulesFileName,
18891884
false,

0 commit comments

Comments
 (0)