summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2017-07-22 11:41:17 +0700
committerAlan Mishchenko <alanmi@berkeley.edu>2017-07-22 11:41:17 +0700
commit2e56f44c66739f5deeaddce31cce2c081bd21943 (patch)
treedd701099fab9dfd63c23fa2f3f883f6486e53a99
parent66af4ae6d16d818f8a12a4b19d2a28aef1a708a7 (diff)
downloadabc-2e56f44c66739f5deeaddce31cce2c081bd21943.tar.gz
abc-2e56f44c66739f5deeaddce31cce2c081bd21943.tar.bz2
abc-2e56f44c66739f5deeaddce31cce2c081bd21943.zip
Compiler warnings.
-rw-r--r--src/aig/aig/aigDup.c42
-rw-r--r--src/aig/aig/aigObj.c2
-rw-r--r--src/aig/gia/giaCSat.c2
-rw-r--r--src/aig/gia/giaCSatOld.c2
-rw-r--r--src/aig/gia/giaCTas.c2
-rw-r--r--src/aig/gia/giaEnable.c2
-rw-r--r--src/aig/gia/giaFrames.c2
-rw-r--r--src/aig/gia/giaIf.c6
-rw-r--r--src/aig/gia/giaMini.c2
-rw-r--r--src/aig/gia/giaSwitch.c4
-rw-r--r--src/aig/ivy/ivyDsd.c4
-rw-r--r--src/aig/ivy/ivyObj.c2
-rw-r--r--src/base/abc/abcFunc.c2
-rw-r--r--src/base/abc/abcHieNew.c2
-rw-r--r--src/base/abci/abcBm.c4
-rw-r--r--src/base/abci/abcDsd.c2
-rw-r--r--src/base/abci/abcMini.c4
-rw-r--r--src/base/abci/abcRec3.c4
-rw-r--r--src/base/abci/abcRr.c2
-rw-r--r--src/base/abci/abcSat.c6
-rw-r--r--src/base/io/ioReadBblif.c4
-rw-r--r--src/bdd/reo/reoSwap.c4
-rw-r--r--src/bool/kit/kitDsd.c2
-rw-r--r--src/map/amap/amapRule.c2
-rw-r--r--src/map/cov/covBuild.c4
-rw-r--r--src/map/if/ifDec07.c2
-rw-r--r--src/map/if/ifDec16.c4
-rw-r--r--src/map/if/ifDsd.c2
-rw-r--r--src/map/mpm/mpmAbc.c2
-rw-r--r--src/opt/dau/dauTree.c2
-rw-r--r--src/opt/nwk/nwkMap.c6
-rw-r--r--src/opt/nwk/nwkStrash.c2
-rw-r--r--src/proof/abs/absGla.c2
-rw-r--r--src/proof/fra/fraCec.c4
-rw-r--r--src/sat/bmc/bmcBmcAnd.c4
35 files changed, 72 insertions, 72 deletions
diff --git a/src/aig/aig/aigDup.c b/src/aig/aig/aigDup.c
index 86ad2104..3ccd8dab 100644
--- a/src/aig/aig/aigDup.c
+++ b/src/aig/aig/aigDup.c
@@ -46,7 +46,7 @@ ABC_NAMESPACE_IMPL_START
Aig_Man_t * Aig_ManDupSimple( Aig_Man_t * p )
{
Aig_Man_t * pNew;
- Aig_Obj_t * pObj, * pObjNew;
+ Aig_Obj_t * pObj, * pObjNew = NULL;
int i;
assert( p->pManTime == NULL );
// create the new manager
@@ -107,7 +107,7 @@ Aig_Man_t * Aig_ManDupSimple( Aig_Man_t * p )
Aig_Man_t * Aig_ManDupSimpleWithHints( Aig_Man_t * p, Vec_Int_t * vHints )
{
Aig_Man_t * pNew;
- Aig_Obj_t * pObj;
+ Aig_Obj_t * pObj = NULL;
int i, Entry;
assert( p->nAsserts == 0 || p->nConstrs == 0 );
// create the new manager
@@ -184,7 +184,7 @@ Aig_Obj_t * Aig_ManDupSimpleDfs_rec( Aig_Man_t * pNew, Aig_Man_t * p, Aig_Obj_t
Aig_Man_t * Aig_ManDupSimpleDfs( Aig_Man_t * p )
{
Aig_Man_t * pNew;
- Aig_Obj_t * pObj, * pObjNew;
+ Aig_Obj_t * pObj, * pObjNew = NULL;
int i;
assert( p->pManTime == NULL );
// create the new manager
@@ -240,7 +240,7 @@ Aig_Man_t * Aig_ManDupSimpleDfs( Aig_Man_t * p )
Aig_Man_t * Aig_ManDupSimpleDfsPart( Aig_Man_t * p, Vec_Ptr_t * vPis, Vec_Ptr_t * vPos )
{
Aig_Man_t * pNew;
- Aig_Obj_t * pObj, * pObjNew;
+ Aig_Obj_t * pObj, * pObjNew = NULL;
int i;
// create the new manager
pNew = Aig_ManStart( Aig_ManObjNumMax(p) );
@@ -277,7 +277,7 @@ Aig_Man_t * Aig_ManDupSimpleDfsPart( Aig_Man_t * p, Vec_Ptr_t * vPis, Vec_Ptr_t
Aig_Man_t * Aig_ManDupOrdered( Aig_Man_t * p )
{
Aig_Man_t * pNew;
- Aig_Obj_t * pObj, * pObjNew;
+ Aig_Obj_t * pObj, * pObjNew = NULL;
int i, nNodes;
// create the new manager
pNew = Aig_ManStart( Aig_ManObjNumMax(p) );
@@ -345,7 +345,7 @@ Aig_Man_t * Aig_ManDupOrdered( Aig_Man_t * p )
Aig_Man_t * Aig_ManDupCof( Aig_Man_t * p, int iInput, int Value )
{
Aig_Man_t * pNew;
- Aig_Obj_t * pObj, * pObjNew;
+ Aig_Obj_t * pObj, * pObjNew = NULL;
int i;
assert( p->pManTime == NULL );
// create the new manager
@@ -413,7 +413,7 @@ Aig_Man_t * Aig_ManDupCof( Aig_Man_t * p, int iInput, int Value )
Aig_Man_t * Aig_ManDupTrim( Aig_Man_t * p )
{
Aig_Man_t * pNew;
- Aig_Obj_t * pObj, * pObjNew;
+ Aig_Obj_t * pObj, * pObjNew = NULL;
int i, nNodes;
// create the new manager
pNew = Aig_ManStart( Aig_ManObjNumMax(p) );
@@ -462,7 +462,7 @@ Aig_Man_t * Aig_ManDupTrim( Aig_Man_t * p )
Aig_Man_t * Aig_ManDupExor( Aig_Man_t * p )
{
Aig_Man_t * pNew;
- Aig_Obj_t * pObj, * pObjNew;
+ Aig_Obj_t * pObj, * pObjNew = NULL;
int i;
// create the new manager
pNew = Aig_ManStart( Aig_ManObjNumMax(p) );
@@ -563,7 +563,7 @@ Aig_Obj_t * Aig_ManDupDfs_rec( Aig_Man_t * pNew, Aig_Man_t * p, Aig_Obj_t * pObj
Aig_Man_t * Aig_ManDupDfs( Aig_Man_t * p )
{
Aig_Man_t * pNew;
- Aig_Obj_t * pObj, * pObjNew;
+ Aig_Obj_t * pObj, * pObjNew = NULL;
int i, nNodes;
// create the new manager
pNew = Aig_ManStart( Aig_ManObjNumMax(p) );
@@ -626,7 +626,7 @@ Aig_Man_t * Aig_ManDupDfs( Aig_Man_t * p )
Vec_Ptr_t * Aig_ManOrderPios( Aig_Man_t * p, Aig_Man_t * pOrder )
{
Vec_Ptr_t * vPios;
- Aig_Obj_t * pObj;
+ Aig_Obj_t * pObj = NULL;
int i;
assert( Aig_ManCiNum(p) == Aig_ManCiNum(pOrder) );
assert( Aig_ManCoNum(p) == Aig_ManCoNum(pOrder) );
@@ -694,7 +694,7 @@ Aig_Obj_t * Aig_ManDupDfsGuided_rec( Aig_Man_t * pNew, Aig_Man_t * p, Aig_Obj_t
Aig_Man_t * Aig_ManDupDfsGuided( Aig_Man_t * p, Vec_Ptr_t * vPios )
{
Aig_Man_t * pNew;
- Aig_Obj_t * pObj, * pObjNew;
+ Aig_Obj_t * pObj, * pObjNew = NULL;
int i, nNodes;
// create the new manager
pNew = Aig_ManStart( Aig_ManObjNumMax(p) );
@@ -764,7 +764,7 @@ Aig_Man_t * Aig_ManDupLevelized( Aig_Man_t * p )
{
Vec_Vec_t * vLevels;
Aig_Man_t * pNew;
- Aig_Obj_t * pObj, * pObjNew;
+ Aig_Obj_t * pObj, * pObjNew = NULL;
int i, k;
// create the new manager
pNew = Aig_ManStart( Aig_ManObjNumMax(p) );
@@ -835,7 +835,7 @@ Aig_Man_t * Aig_ManDupLevelized( Aig_Man_t * p )
Aig_Man_t * Aig_ManDupWithoutPos( Aig_Man_t * p )
{
Aig_Man_t * pNew;
- Aig_Obj_t * pObj;
+ Aig_Obj_t * pObj = NULL;
int i;
// create the new manager
pNew = Aig_ManStart( Aig_ManObjNumMax(p) );
@@ -871,7 +871,7 @@ Aig_Man_t * Aig_ManDupWithoutPos( Aig_Man_t * p )
Aig_Man_t * Aig_ManDupFlopsOnly( Aig_Man_t * p )
{
Aig_Man_t * pNew;
- Aig_Obj_t * pObj;
+ Aig_Obj_t * pObj = NULL;
int i;
pNew = Aig_ManDupWithoutPos( p );
Saig_ManForEachLi( p, pObj, i )
@@ -920,7 +920,7 @@ static inline Aig_Obj_t * Aig_ObjChild1Repres( Aig_Man_t * p, Aig_Obj_t * pObj )
Aig_Man_t * Aig_ManDupRepres( Aig_Man_t * p )
{
Aig_Man_t * pNew;
- Aig_Obj_t * pObj;
+ Aig_Obj_t * pObj = NULL;
int i;
// start the HOP package
pNew = Aig_ManStart( Aig_ManObjNumMax(p) );
@@ -995,7 +995,7 @@ Aig_Obj_t * Aig_ManDupRepres_rec( Aig_Man_t * pNew, Aig_Man_t * p, Aig_Obj_t * p
Aig_Man_t * Aig_ManDupRepresDfs( Aig_Man_t * p )
{
Aig_Man_t * pNew;
- Aig_Obj_t * pObj;
+ Aig_Obj_t * pObj = NULL;
int i;
// start the HOP package
pNew = Aig_ManStart( Aig_ManObjNumMax(p) );
@@ -1049,7 +1049,7 @@ Aig_Man_t * Aig_ManDupRepresDfs( Aig_Man_t * p )
Aig_Man_t * Aig_ManCreateMiter( Aig_Man_t * p1, Aig_Man_t * p2, int Oper )
{
Aig_Man_t * pNew;
- Aig_Obj_t * pObj;
+ Aig_Obj_t * pObj = NULL;
int i;
assert( Aig_ManRegNum(p1) == 0 );
assert( Aig_ManRegNum(p2) == 0 );
@@ -1152,7 +1152,7 @@ Aig_Man_t * Aig_ManDupOrpos( Aig_Man_t * p, int fAddRegs )
Aig_Man_t * Aig_ManDupOneOutput( Aig_Man_t * p, int iPoNum, int fAddRegs )
{
Aig_Man_t * pNew;
- Aig_Obj_t * pObj;
+ Aig_Obj_t * pObj = NULL;
int i;
assert( Aig_ManRegNum(p) > 0 );
assert( iPoNum < Aig_ManCoNum(p)-Aig_ManRegNum(p) );
@@ -1199,7 +1199,7 @@ Aig_Man_t * Aig_ManDupOneOutput( Aig_Man_t * p, int iPoNum, int fAddRegs )
Aig_Man_t * Aig_ManDupUnsolvedOutputs( Aig_Man_t * p, int fAddRegs )
{
Aig_Man_t * pNew;
- Aig_Obj_t * pObj;
+ Aig_Obj_t * pObj = NULL;
int i, nOuts = 0;
assert( Aig_ManRegNum(p) > 0 );
if ( p->nConstrs > 0 )
@@ -1255,7 +1255,7 @@ Aig_Man_t * Aig_ManDupUnsolvedOutputs( Aig_Man_t * p, int fAddRegs )
Aig_Man_t * Aig_ManDupArray( Vec_Ptr_t * vArray )
{
Aig_Man_t * p, * pNew;
- Aig_Obj_t * pObj;
+ Aig_Obj_t * pObj = NULL;
int i, k;
if ( Vec_PtrSize(vArray) == 0 )
return NULL;
@@ -1303,7 +1303,7 @@ Aig_Man_t * Aig_ManDupNodes( Aig_Man_t * pMan, Vec_Ptr_t * vArray )
{
Aig_Man_t * pNew;
Vec_Ptr_t * vObjs;
- Aig_Obj_t * pObj;
+ Aig_Obj_t * pObj = NULL;
int i;
if ( Vec_PtrSize(vArray) == 0 )
return NULL;
diff --git a/src/aig/aig/aigObj.c b/src/aig/aig/aigObj.c
index 98025ae3..4de2e191 100644
--- a/src/aig/aig/aigObj.c
+++ b/src/aig/aig/aigObj.c
@@ -392,7 +392,7 @@ void Aig_ObjPrint( Aig_Man_t * p, Aig_Obj_t * pObj )
***********************************************************************/
void Aig_NodeFixBufferFanins( Aig_Man_t * p, Aig_Obj_t * pObj, int fUpdateLevel )
{
- Aig_Obj_t * pFanReal0, * pFanReal1, * pResult;
+ Aig_Obj_t * pFanReal0, * pFanReal1, * pResult = NULL;
p->nBufFixes++;
if ( Aig_ObjIsCo(pObj) )
{
diff --git a/src/aig/gia/giaCSat.c b/src/aig/gia/giaCSat.c
index 65cf2961..e0e0e315 100644
--- a/src/aig/gia/giaCSat.c
+++ b/src/aig/gia/giaCSat.c
@@ -860,7 +860,7 @@ int Cbs_ManPropagate( Cbs_Man_t * p, int Level )
int Cbs_ManSolve_rec( Cbs_Man_t * p, int Level )
{
Cbs_Que_t * pQue = &(p->pClauses);
- Gia_Obj_t * pVar, * pDecVar;
+ Gia_Obj_t * pVar = NULL, * pDecVar;
int hClause, hLearn0, hLearn1;
int iPropHead, iJustHead, iJustTail;
// propagate assignments
diff --git a/src/aig/gia/giaCSatOld.c b/src/aig/gia/giaCSatOld.c
index a562c8ae..43a65a4b 100644
--- a/src/aig/gia/giaCSatOld.c
+++ b/src/aig/gia/giaCSatOld.c
@@ -585,7 +585,7 @@ int Cbs0_ManPropagate( Cbs0_Man_t * p )
***********************************************************************/
int Cbs0_ManSolve_rec( Cbs0_Man_t * p )
{
- Gia_Obj_t * pVar, * pDecVar;
+ Gia_Obj_t * pVar = NULL, * pDecVar;
int iPropHead, iJustHead, iJustTail;
// propagate assignments
assert( !Cbs0_QueIsEmpty(&p->pProp) );
diff --git a/src/aig/gia/giaCTas.c b/src/aig/gia/giaCTas.c
index 73575733..3dded68b 100644
--- a/src/aig/gia/giaCTas.c
+++ b/src/aig/gia/giaCTas.c
@@ -1285,7 +1285,7 @@ int Tas_ManPropagate( Tas_Man_t * p, int Level )
int Tas_ManSolve_rec( Tas_Man_t * p, int Level )
{
Tas_Que_t * pQue = &(p->pClauses);
- Gia_Obj_t * pVar, * pDecVar = NULL;
+ Gia_Obj_t * pVar = NULL, * pDecVar = NULL;
int hClause, hLearn0, hLearn1;
int iPropHead, iJustHead, iJustTail;
// propagate assignments
diff --git a/src/aig/gia/giaEnable.c b/src/aig/gia/giaEnable.c
index b7d0616d..3377a49c 100644
--- a/src/aig/gia/giaEnable.c
+++ b/src/aig/gia/giaEnable.c
@@ -516,7 +516,7 @@ Gia_Man_t * Gia_ManRemoveEnables( Gia_Man_t * p )
Vec_Ptr_t * vCtrls, * vDatas;
Vec_Int_t * vFlopClasses;
Gia_Man_t * pNew, * pAux;
- Gia_Obj_t * pFlopIn, * pFlopOut, * pDriver, * pFan0, * pFan1, * pCtrl, * pData, * pObj;
+ Gia_Obj_t * pFlopIn, * pFlopOut, * pDriver, * pFan0, * pFan1, * pCtrl = NULL, * pData, * pObj;
int i, iClass, fCompl, Counter = 0;
vCtrls = Vec_PtrAlloc( 100 );
Vec_PtrPush( vCtrls, NULL );
diff --git a/src/aig/gia/giaFrames.c b/src/aig/gia/giaFrames.c
index 3b33e3de..39493be8 100644
--- a/src/aig/gia/giaFrames.c
+++ b/src/aig/gia/giaFrames.c
@@ -438,7 +438,7 @@ void * Gia_ManUnrollAdd( void * pMan, int fMax )
{
Gia_ManUnr_t * p = (Gia_ManUnr_t *)pMan;
Gia_Obj_t * pObj;
- int f, i, Lit, Beg, End;
+ int f, i, Lit = 0, Beg, End;
// create PIs on demand
if ( p->pPars->fSaveLastLit )
for ( i = 0; i < Gia_ManPiNum(p->pAig); i++ )
diff --git a/src/aig/gia/giaIf.c b/src/aig/gia/giaIf.c
index 70cf707d..f2d63060 100644
--- a/src/aig/gia/giaIf.c
+++ b/src/aig/gia/giaIf.c
@@ -773,7 +773,7 @@ static inline If_Obj_t * If_ManFanin1Copy( If_Man_t * pIfMan, Gia_Obj_t * pObj )
If_Man_t * Gia_ManToIf( Gia_Man_t * p, If_Par_t * pPars )
{
If_Man_t * pIfMan;
- If_Obj_t * pIfObj;
+ If_Obj_t * pIfObj = NULL;
Gia_Obj_t * pObj;
int i;
// create levels with choices
@@ -1500,7 +1500,7 @@ int Gia_ManFromIfLogicFindLut( If_Man_t * pIfMan, Gia_Man_t * pNew, If_Cut_t * p
***********************************************************************/
void Gia_ManFromIfGetConfig( Vec_Int_t * vConfigs, If_Man_t * pIfMan, If_Cut_t * pCutBest, int iLit, Vec_Str_t * vConfigsStr )
{
- If_Obj_t * pIfObj;
+ If_Obj_t * pIfObj = NULL;
word * pPerm = If_DsdManGetFuncConfig( pIfMan->pIfDsdMan, If_CutDsdLit(pIfMan, pCutBest) ); // cell input -> DSD input
char * pCutPerm = If_CutDsdPerm( pIfMan, pCutBest ); // DSD input -> cut input
word * pArray; int v, i, Lit, Var;
@@ -2296,7 +2296,7 @@ Gia_Man_t * Gia_ManPerformMappingInt( Gia_Man_t * p, If_Par_t * pPars )
pNew = Gia_ManFromIfLogic( pIfMan );
if ( p->vCiArrs || p->vCoReqs )
{
- If_Obj_t * pIfObj;
+ If_Obj_t * pIfObj = NULL;
Vec_IntFreeP( &p->vCoArrs );
p->vCoArrs = Vec_IntAlloc( Gia_ManCoNum(p) );
If_ManForEachCo( pIfMan, pIfObj, i )
diff --git a/src/aig/gia/giaMini.c b/src/aig/gia/giaMini.c
index b4150807..3fb8aecb 100644
--- a/src/aig/gia/giaMini.c
+++ b/src/aig/gia/giaMini.c
@@ -61,7 +61,7 @@ Gia_Man_t * Gia_ManFromMiniAig( Mini_Aig_t * p, Vec_Int_t ** pvCopies )
{
Gia_Man_t * pGia, * pTemp;
Vec_Int_t * vCopies;
- int i, iGiaLit, nNodes;
+ int i, iGiaLit = 0, nNodes;
// get the number of nodes
nNodes = Mini_AigNodeNum(p);
// create ABC network
diff --git a/src/aig/gia/giaSwitch.c b/src/aig/gia/giaSwitch.c
index 58acbb69..b1c5eb82 100644
--- a/src/aig/gia/giaSwitch.c
+++ b/src/aig/gia/giaSwitch.c
@@ -146,7 +146,7 @@ void Gia_ManSwiDelete( Gia_ManSwi_t * p )
***********************************************************************/
static inline void Gia_ManSwiSimInfoRandom( Gia_ManSwi_t * p, unsigned * pInfo, int nProbNum )
{
- unsigned Mask;
+ unsigned Mask = 0;
int w, i;
if ( nProbNum == -1 )
{ // 3/8 = 1/4 + 1/8
@@ -185,7 +185,7 @@ static inline void Gia_ManSwiSimInfoRandom( Gia_ManSwi_t * p, unsigned * pInfo,
***********************************************************************/
static inline void Gia_ManSwiSimInfoRandomShift( Gia_ManSwi_t * p, unsigned * pInfo, int nProbNum )
{
- unsigned Mask;
+ unsigned Mask = 0;
int w, i;
if ( nProbNum == -1 )
{ // 3/8 = 1/4 + 1/8
diff --git a/src/aig/ivy/ivyDsd.c b/src/aig/ivy/ivyDsd.c
index 5a1deb03..78a935be 100644
--- a/src/aig/ivy/ivyDsd.c
+++ b/src/aig/ivy/ivyDsd.c
@@ -219,8 +219,8 @@ int Ivy_TruthDsd( unsigned uTruth, Vec_Int_t * vTree )
int Ivy_TruthDecompose_rec( unsigned uTruth, Vec_Int_t * vTree )
{
Ivy_Dec_t Node;
- int Supp[5], Vars0[5], Vars1[5], Vars2[5], * pVars;
- int nSupp, Count0, Count1, Count2, nVars, RetValue, fCompl, i;
+ int Supp[5], Vars0[5], Vars1[5], Vars2[5], * pVars = NULL;
+ int nSupp, Count0, Count1, Count2, nVars = 0, RetValue, fCompl = 0, i;
unsigned uTruthCof, uCof0, uCof1;
// get constant confactors
diff --git a/src/aig/ivy/ivyObj.c b/src/aig/ivy/ivyObj.c
index 2829fd38..527f4daf 100644
--- a/src/aig/ivy/ivyObj.c
+++ b/src/aig/ivy/ivyObj.c
@@ -441,7 +441,7 @@ void Ivy_ObjReplace( Ivy_Man_t * p, Ivy_Obj_t * pObjOld, Ivy_Obj_t * pObjNew, in
***********************************************************************/
void Ivy_NodeFixBufferFanins( Ivy_Man_t * p, Ivy_Obj_t * pNode, int fUpdateLevel )
{
- Ivy_Obj_t * pFanReal0, * pFanReal1, * pResult;
+ Ivy_Obj_t * pFanReal0, * pFanReal1, * pResult = NULL;
if ( Ivy_ObjIsPo(pNode) )
{
if ( !Ivy_ObjIsBuf(Ivy_ObjFanin0(pNode)) )
diff --git a/src/base/abc/abcFunc.c b/src/base/abc/abcFunc.c
index f115231f..8f68d4be 100644
--- a/src/base/abc/abcFunc.c
+++ b/src/base/abc/abcFunc.c
@@ -216,7 +216,7 @@ char * Abc_ConvertBddToSop( Mem_Flex_t * pMan, DdManager * dd, DdNode * bFuncOn,
int fVerify = 0;
char * pSop;
DdNode * bFuncNew, * bCover, * zCover, * zCover0, * zCover1;
- int nCubes, nCubes0, nCubes1, fPhase;
+ int nCubes = 0, nCubes0, nCubes1, fPhase = 0;
assert( bFuncOn == bFuncOnDc || Cudd_bddLeq( dd, bFuncOn, bFuncOnDc ) );
if ( Cudd_IsConstant(bFuncOn) || Cudd_IsConstant(bFuncOnDc) )
diff --git a/src/base/abc/abcHieNew.c b/src/base/abc/abcHieNew.c
index d50c274e..0f191707 100644
--- a/src/base/abc/abcHieNew.c
+++ b/src/base/abc/abcHieNew.c
@@ -1131,7 +1131,7 @@ extern int Abc_NtkCheckRecursive( Abc_Ntk_t * pNtk );
void Au_NtkDeriveFlatGia_rec( Gia_Man_t * pGia, Au_Ntk_t * p )
{
Au_Obj_t * pObj, * pTerm;
- int i, k, Lit;
+ int i, k, Lit = 0;
Au_NtkForEachPi( p, pTerm, i )
assert( Au_ObjCopy(pTerm) >= 0 );
if ( strcmp(Au_NtkName(p), "ref_egcd") == 0 )
diff --git a/src/base/abci/abcBm.c b/src/base/abci/abcBm.c
index 860b4d27..80bb0d83 100644
--- a/src/base/abci/abcBm.c
+++ b/src/base/abci/abcBm.c
@@ -872,7 +872,7 @@ int Abc_NtkMiterSatBm( Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nIn
{
static sat_solver * pSat = NULL;
lbool status;
- int RetValue;
+ int RetValue = 0;
abctime clk;
extern int Abc_NodeAddClausesTop( sat_solver * pSat, Abc_Obj_t * pNode, Vec_Int_t * vVars );
@@ -970,7 +970,7 @@ int Abc_NtkBmSat( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, Vec_Ptr_t * iMatchPairs,
Abc_Ntk_t * pMiter = NULL;
Abc_Ntk_t * pCnf;
- int RetValue;
+ int RetValue = 0;
// get the miter of the two networks
if( mode == 0 )
diff --git a/src/base/abci/abcDsd.c b/src/base/abci/abcDsd.c
index 9104c4d6..4d8f5217 100644
--- a/src/base/abci/abcDsd.c
+++ b/src/base/abci/abcDsd.c
@@ -220,7 +220,7 @@ Abc_Obj_t * Abc_NtkDsdConstructNode( Dsd_Manager_t * pManDsd, Dsd_Node_t * pNode
DdManager * ddNew = (DdManager *)pNtkNew->pManFunc;
Dsd_Node_t * pFaninDsd;
Abc_Obj_t * pNodeNew, * pFanin;
- DdNode * bLocal, * bTemp, * bVar;
+ DdNode * bLocal = NULL, * bTemp, * bVar;
Dsd_Type_t Type;
int i, nDecs;
diff --git a/src/base/abci/abcMini.c b/src/base/abci/abcMini.c
index 876f4c8c..67ce8382 100644
--- a/src/base/abci/abcMini.c
+++ b/src/base/abci/abcMini.c
@@ -60,7 +60,7 @@ Abc_Obj_t * Abc_NodeFanin1Copy( Abc_Ntk_t * pNtk, Vec_Int_t * vCopies, Mini_Aig_
Abc_Ntk_t * Abc_NtkFromMiniAig( Mini_Aig_t * p )
{
Abc_Ntk_t * pNtk;
- Abc_Obj_t * pObj;
+ Abc_Obj_t * pObj = NULL;
Vec_Int_t * vCopies;
int i, nNodes;
// get the number of nodes
@@ -123,7 +123,7 @@ int Abc_NodeFanin1Copy2( Abc_Obj_t * pObj )
Mini_Aig_t * Abc_NtkToMiniAig( Abc_Ntk_t * pNtk )
{
Mini_Aig_t * p;
- Abc_Obj_t * pObj;
+ Abc_Obj_t * pObj = NULL;
int i;
assert( Abc_NtkIsStrash(pNtk) );
// create the manager
diff --git a/src/base/abci/abcRec3.c b/src/base/abci/abcRec3.c
index 965a0ecd..6d2d58eb 100644
--- a/src/base/abci/abcRec3.c
+++ b/src/base/abci/abcRec3.c
@@ -1005,7 +1005,7 @@ int If_CutDelayRecCost3( If_Man_t * pIfMan, If_Cut_t * pCut, If_Obj_t * pObj )
{
Lms_Man_t * p = s_pMan3;
char pCanonPerm[LMS_VAR_MAX];
- unsigned uCanonPhase;
+ unsigned uCanonPhase = 0;
// make sure the cut functions match the library
assert( p->nVars == (int)pCut->nLimit );
// if this assertion fires, it means that LMS manager was used for library construction
@@ -1032,7 +1032,7 @@ Hop_Obj_t * Abc_RecToHop3( Hop_Man_t * pMan, If_Man_t * pIfMan, If_Cut_t * pCut,
{
Lms_Man_t * p = s_pMan3;
char pCanonPerm[LMS_VAR_MAX];
- unsigned uCanonPhase;
+ unsigned uCanonPhase = 0;
Hop_Obj_t * pFan0, * pFan1, * pHopObj;
Gia_Man_t * pGia = p->pGia;
Gia_Obj_t * pGiaPo, * pGiaTemp = NULL;
diff --git a/src/base/abci/abcRr.c b/src/base/abci/abcRr.c
index 9a670b67..52d1fd32 100644
--- a/src/base/abci/abcRr.c
+++ b/src/base/abci/abcRr.c
@@ -384,7 +384,7 @@ p->timeProve += Abc_Clock() - clk;
***********************************************************************/
int Abc_NtkRRUpdate( Abc_Ntk_t * pNtk, Abc_Obj_t * pNode, Abc_Obj_t * pFanin, Abc_Obj_t * pFanout )
{
- Abc_Obj_t * pNodeNew, * pFanoutNew;
+ Abc_Obj_t * pNodeNew = NULL, * pFanoutNew = NULL;
assert( pFanout == NULL );
assert( !Abc_ObjIsComplement(pNode) );
assert( !Abc_ObjIsComplement(pFanin) );
diff --git a/src/base/abci/abcSat.c b/src/base/abci/abcSat.c
index bc956e5e..f0ed1532 100644
--- a/src/base/abci/abcSat.c
+++ b/src/base/abci/abcSat.c
@@ -57,7 +57,7 @@ int Abc_NtkMiterSat( Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nInsL
{
sat_solver * pSat;
lbool status;
- int RetValue;
+ int RetValue = 0;
abctime clk;
if ( pNumConfs )
@@ -677,7 +677,7 @@ int Abc_NodeAddClauses( sat_solver * pSat, char * pSop0, char * pSop1, Abc_Obj_t
{
Abc_Obj_t * pFanin;
int i, c, nFanins;
- int RetValue;
+ int RetValue = 0;
char * pCube;
nFanins = Abc_ObjFaninNum( pNode );
@@ -767,7 +767,7 @@ int Abc_NodeAddClauses( sat_solver * pSat, char * pSop0, char * pSop1, Abc_Obj_t
int Abc_NodeAddClausesTop( sat_solver * pSat, Abc_Obj_t * pNode, Vec_Int_t * vVars )
{
Abc_Obj_t * pFanin;
- int RetValue;
+ int RetValue = 0;
pFanin = Abc_ObjFanin0(pNode);
if ( Abc_ObjFaninC0(pNode) )
diff --git a/src/base/io/ioReadBblif.c b/src/base/io/ioReadBblif.c
index 2de62695..945b6259 100644
--- a/src/base/io/ioReadBblif.c
+++ b/src/base/io/ioReadBblif.c
@@ -55,7 +55,7 @@ ABC_NAMESPACE_IMPL_START
Abc_Ntk_t * Bbl_ManToAbc( Bbl_Man_t * p )
{
Abc_Ntk_t * pNtk;
- Abc_Obj_t * pObjNew;
+ Abc_Obj_t * pObjNew = NULL;
Bbl_Obj_t * pObj, * pFanin;
Vec_Ptr_t * vCopy;
// start the network
@@ -160,7 +160,7 @@ Abc_Ntk_t * Bbl_ManToAig( Bbl_Man_t * p )
extern Abc_Obj_t * Dec_GraphToAig( Abc_Ntk_t * pNtk, Dec_Graph_t * pFForm, Vec_Ptr_t * vFaninAigs );
int fVerbose = 0;
Abc_Ntk_t * pNtk;
- Abc_Obj_t * pObjNew;
+ Abc_Obj_t * pObjNew = NULL;
Bbl_Obj_t * pObj, * pFanin;
Vec_Ptr_t * vCopy, * vNodes, * vFaninAigs;
Dec_Graph_t ** pFForms;
diff --git a/src/bdd/reo/reoSwap.c b/src/bdd/reo/reoSwap.c
index a78fc88d..7894735d 100644
--- a/src/bdd/reo/reoSwap.c
+++ b/src/bdd/reo/reoSwap.c
@@ -54,8 +54,8 @@ double reoReorderSwapAdjacentVars( reo_man * p, int lev0, int fMovingUp )
reo_unit * pNewPlane20R;
reo_unit * pUnitE, * pUnitER, * pUnitT;
// the nodes below lev1
- reo_unit * pNew1E, * pNew1T, * pNew2E, * pNew2T;
- reo_unit * pNew1ER, * pNew2ER;
+ reo_unit * pNew1E = NULL, * pNew1T = NULL, * pNew2E = NULL, * pNew2T = NULL;
+ reo_unit * pNew1ER = NULL, * pNew2ER = NULL;
// the old linked lists
reo_unit * pListOld0 = p->pPlanes[lev0].pHead;
reo_unit * pListOld1 = p->pPlanes[lev1].pHead;
diff --git a/src/bool/kit/kitDsd.c b/src/bool/kit/kitDsd.c
index 0150a549..07c16f12 100644
--- a/src/bool/kit/kitDsd.c
+++ b/src/bool/kit/kitDsd.c
@@ -1840,7 +1840,7 @@ int Kit_DsdFindLargeBox( Kit_DsdNtk_t * pNtk, int Size )
int Kit_DsdCountAigNodes_rec( Kit_DsdNtk_t * pNtk, int Id )
{
Kit_DsdObj_t * pObj;
- unsigned iLit, i, RetValue;
+ unsigned iLit, i, RetValue = 0;
pObj = Kit_DsdNtkObj( pNtk, Id );
if ( pObj == NULL )
return 0;
diff --git a/src/map/amap/amapRule.c b/src/map/amap/amapRule.c
index 7a91ccbf..94c5bb9f 100644
--- a/src/map/amap/amapRule.c
+++ b/src/map/amap/amapRule.c
@@ -190,7 +190,7 @@ Vec_Int_t * Amap_CreateRulesVector_rec( Amap_Lib_t * p, Vec_Ptr_t * vVecNods, in
***********************************************************************/
Vec_Int_t * Amap_CreateRulesFromDsd_rec( Amap_Lib_t * pLib, Kit_DsdNtk_t * p, int iLit )
{
- Vec_Int_t * vRes;
+ Vec_Int_t * vRes = NULL;
Vec_Ptr_t * vVecNods;
Vec_Int_t * vNodsFanin;
Kit_DsdObj_t * pObj;
diff --git a/src/map/cov/covBuild.c b/src/map/cov/covBuild.c
index 6ca17583..353e7aae 100644
--- a/src/map/cov/covBuild.c
+++ b/src/map/cov/covBuild.c
@@ -102,7 +102,7 @@ Abc_Obj_t * Abc_NtkCovDeriveCube( Abc_Ntk_t * pNtkNew, Abc_Obj_t * pObj, Min_Cub
***********************************************************************/
Abc_Obj_t * Abc_NtkCovDeriveNode_rec( Cov_Man_t * p, Abc_Ntk_t * pNtkNew, Abc_Obj_t * pObj, int Level )
{
- Min_Cube_t * pCover, * pCube;
+ Min_Cube_t * pCover = NULL, * pCube;
Abc_Obj_t * pFaninNew, * pNodeNew, * pFanin;
Vec_Int_t * vSupp;
int Entry, nCubes, i;
@@ -400,7 +400,7 @@ Abc_Obj_t * Abc_NtkCovDerive_rec( Cov_Man_t * p, Abc_Ntk_t * pNtkNew, Abc_Obj_t
Abc_Obj_t * pNodeNew, * pFanin;
Vec_Int_t * vSupp;
Vec_Str_t * vCover;
- int i, Entry, nCubes, Type;
+ int i, Entry, nCubes, Type = 0;
// skip if already computed
if ( pObj->pCopy )
return pObj->pCopy;
diff --git a/src/map/if/ifDec07.c b/src/map/if/ifDec07.c
index 0200d347..1f3fea3e 100644
--- a/src/map/if/ifDec07.c
+++ b/src/map/if/ifDec07.c
@@ -1005,7 +1005,7 @@ void If_Dec5PerformTest()
word z, t, t1;
// s = If_Dec5PerformEx();
// t = If_Dec6Truth( s );
- t = 0xB0F3B0FFB0F3B0FF;
+ t = ABC_CONST(0xB0F3B0FFB0F3B0FF);
Kit_DsdPrintFromTruth( (unsigned *)&t, 5 ); printf("\n");
diff --git a/src/map/if/ifDec16.c b/src/map/if/ifDec16.c
index 4b555bf8..b6591da9 100644
--- a/src/map/if/ifDec16.c
+++ b/src/map/if/ifDec16.c
@@ -977,9 +977,9 @@ int If_CluCountCofs( word * pF, int nVars, int nBSsize, int iShift, word pCofs[3
// return the number of cofactors w.r.t. the topmost vars (nBSsize)
int If_CluCountCofs4( word * pF, int nVars, int nBSsize, word pCofs[6][CLU_WRD_MAX/4] )
{
- word iCofs[128], iCof, Result0 = 0, Result1 = 0;
+ word iCofs[128] = {0}, iCof, Result0 = 0, Result1 = 0;
int nMints = (1 << nBSsize);
- int i, c, nCofs;
+ int i, c, nCofs = 0;
assert( pCofs );
assert( nBSsize >= 2 && nBSsize <= 6 && nBSsize < nVars );
if ( nVars - nBSsize < 6 )
diff --git a/src/map/if/ifDsd.c b/src/map/if/ifDsd.c
index f2cdc764..2094a5d9 100644
--- a/src/map/if/ifDsd.c
+++ b/src/map/if/ifDsd.c
@@ -1678,7 +1678,7 @@ int If_DsdManAddDsd_rec( char * pStr, char ** p, int * pMatches, If_DsdMan_t * p
}
if ( **p == '(' || **p == '[' || **p == '<' || **p == '{' ) // and/or/xor
{
- int Type, nLits = 0, pLits[DAU_MAX_VAR];
+ int Type = 0, nLits = 0, pLits[DAU_MAX_VAR];
char * q = pStr + pMatches[ *p - pStr ];
if ( **p == '(' )
Type = DAU_DSD_AND;
diff --git a/src/map/mpm/mpmAbc.c b/src/map/mpm/mpmAbc.c
index 65aab082..ba16b20f 100644
--- a/src/map/mpm/mpmAbc.c
+++ b/src/map/mpm/mpmAbc.c
@@ -218,7 +218,7 @@ void * Mpm_ManFromIfLogic( Mpm_Man_t * pMan )
Vec_Int_t * vMapping, * vMapping2, * vPacking = NULL;
Vec_Int_t * vLeaves, * vLeaves2, * vCover;
word uTruth, * pTruth = &uTruth;
- int i, k, Entry, iLitNew;
+ int i, k, Entry, iLitNew = 0;
// assert( !pMan->pPars->fDeriveLuts || pMan->pPars->fTruth );
// start mapping and packing
vMapping = Vec_IntStart( Mig_ManObjNum(pMan->pMig) );
diff --git a/src/opt/dau/dauTree.c b/src/opt/dau/dauTree.c
index 4a522d92..f8508d53 100644
--- a/src/opt/dau/dauTree.c
+++ b/src/opt/dau/dauTree.c
@@ -560,7 +560,7 @@ int Dss_NtkCreate_rec( char * pStr, char ** p, int * pMatches, Dss_Ntk_t * pNtk,
Dss_Obj_t * pObj;
Vec_Int_t * vFaninLits = Vec_IntAlloc( 10 );
char * q = pStr + pMatches[ *p - pStr ];
- int Type;
+ int Type = 0;
if ( **p == '(' )
Type = DAU_DSD_AND;
else if ( **p == '[' )
diff --git a/src/opt/nwk/nwkMap.c b/src/opt/nwk/nwkMap.c
index d3431c42..04d8b198 100644
--- a/src/opt/nwk/nwkMap.c
+++ b/src/opt/nwk/nwkMap.c
@@ -106,7 +106,7 @@ If_Man_t * Nwk_ManToIf( Aig_Man_t * p, If_Par_t * pPars, Vec_Ptr_t * vAigToIf )
Vec_Int_t * vSwitching = NULL, * vSwitching2 = NULL;
float * pSwitching = NULL, * pSwitching2 = NULL;
If_Man_t * pIfMan;
- If_Obj_t * pIfObj;
+ If_Obj_t * pIfObj = NULL;
Aig_Obj_t * pNode, * pFanin, * pPrev;
int i;
abctime clk = Abc_Clock();
@@ -276,9 +276,9 @@ Nwk_Man_t * Nwk_ManFromIf( If_Man_t * pIfMan, Aig_Man_t * p, Vec_Ptr_t * vAigToI
{
Vec_Ptr_t * vIfToAig;
Nwk_Man_t * pNtk;
- Nwk_Obj_t * pObjNew;
+ Nwk_Obj_t * pObjNew = NULL;
Aig_Obj_t * pObj, * pObjRepr;
- If_Obj_t * pIfObj;
+ If_Obj_t * pIfObj = NULL;
If_Cut_t * pCutBest;
int i, k, nLeaves, * ppLeaves;
assert( Aig_ManCiNum(p) == If_ManCiNum(pIfMan) );
diff --git a/src/opt/nwk/nwkStrash.c b/src/opt/nwk/nwkStrash.c
index 26fba57f..19a322b9 100644
--- a/src/opt/nwk/nwkStrash.c
+++ b/src/opt/nwk/nwkStrash.c
@@ -100,7 +100,7 @@ Aig_Man_t * Nwk_ManStrash( Nwk_Man_t * pNtk )
{
Vec_Ptr_t * vObjs;
Aig_Man_t * pMan;
- Aig_Obj_t * pObjNew;
+ Aig_Obj_t * pObjNew = NULL;
Nwk_Obj_t * pObj;
int i, Level;
pMan = Aig_ManStart( Nwk_ManGetAigNodeNum(pNtk) );
diff --git a/src/proof/abs/absGla.c b/src/proof/abs/absGla.c
index 5f8503a5..698d415b 100644
--- a/src/proof/abs/absGla.c
+++ b/src/proof/abs/absGla.c
@@ -828,7 +828,7 @@ static inline void Ga2_ManAddToAbsOneDynamic( Ga2_Man_t * p, Gia_Obj_t * pObj, i
Vec_Int_t * vLeaves;
Gia_Obj_t * pLeaf;
unsigned uTruth;
- int i, Lit;
+ int i, Lit = 0;
assert( Ga2_ObjIsAbs0(p, pObj) );
assert( Gia_ObjIsConst0(pObj) || Gia_ObjIsRo(p->pGia, pObj) || Gia_ObjIsAnd(pObj) );
diff --git a/src/proof/fra/fraCec.c b/src/proof/fra/fraCec.c
index 84f37930..6cdaa248 100644
--- a/src/proof/fra/fraCec.c
+++ b/src/proof/fra/fraCec.c
@@ -53,7 +53,7 @@ int Fra_FraigSat( Aig_Man_t * pMan, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimi
sat_solver2 * pSat;
Cnf_Dat_t * pCnf;
- int status, RetValue;
+ int status, RetValue = 0;
abctime clk = Abc_Clock();
Vec_Int_t * vCiIds;
@@ -165,7 +165,7 @@ int Fra_FraigSat( Aig_Man_t * pMan, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimi
{
sat_solver * pSat;
Cnf_Dat_t * pCnf;
- int status, RetValue;
+ int status, RetValue = 0;
abctime clk = Abc_Clock();
Vec_Int_t * vCiIds;
diff --git a/src/sat/bmc/bmcBmcAnd.c b/src/sat/bmc/bmcBmcAnd.c
index 3490d34f..04d44353 100644
--- a/src/sat/bmc/bmcBmcAnd.c
+++ b/src/sat/bmc/bmcBmcAnd.c
@@ -466,7 +466,7 @@ Gia_Man_t * Gia_ManBmcDupCone( Gia_Man_t * p, Vec_Int_t * vIns, Vec_Int_t * vNod
***********************************************************************/
int Gia_ManBmcAssignVarIds( Bmc_Mna_t * p, Vec_Int_t * vIns, Vec_Int_t * vUsed, Vec_Int_t * vOuts )
{
- int i, iObj, VarC0 = p->nSatVars++;
+ int i, iObj = 0, VarC0 = p->nSatVars++;
Vec_IntForEachEntry( vIns, iObj, i )
if ( Vec_IntEntry( p->vId2Var, iObj ) == 0 )
Vec_IntWriteEntry( p->vId2Var, iObj, p->nSatVars++ );
@@ -504,7 +504,7 @@ void Gia_ManBmcAddCnf( Bmc_Mna_t * p, Gia_Man_t * pGia, Vec_Int_t * vIns, Vec_In
Cnf_Dat_t * pCnf = Cnf_Derive( pAig, Aig_ManCoNum(pAig) );
Vec_Int_t * vUsed, * vMap;
Gia_Obj_t * pObj;
- int i, iObj, VarC0;
+ int i, iObj = 0, VarC0;
// collect used variables
vUsed = Vec_IntAlloc( pCnf->nVars - Vec_IntSize(vIns) - Vec_IntSize(vOuts) );
Gia_ManForEachAnd( pNew, pObj, i )