From cb4631e64e9a95cafc4ef31a60f006c7f067cf91 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Thu, 17 Oct 2013 18:04:07 -0700 Subject: Compiler warnings. --- src/aig/saig/saigInd.c | 4 ++-- src/aig/saig/saigSynch.c | 2 +- src/base/abc/abcNtk.c | 2 +- src/base/abci/abcRec.c | 7 ++++--- src/base/abci/abcRec2.c | 6 +++--- src/base/io/ioWriteBook.c | 12 ++++++++---- src/bool/lucky/lucky.h | 2 +- src/bool/lucky/luckyInt.h | 2 +- src/bool/rpo/rpo.h | 1 + src/opt/fxu/fxuPrint.c | 2 ++ src/proof/llb/llb1Reach.c | 2 +- src/proof/llb/llb2Flow.c | 5 +++-- src/proof/llb/llb2Image.c | 3 ++- 13 files changed, 30 insertions(+), 20 deletions(-) diff --git a/src/aig/saig/saigInd.c b/src/aig/saig/saigInd.c index 90b8e51f..f437dba0 100644 --- a/src/aig/saig/saigInd.c +++ b/src/aig/saig/saigInd.c @@ -149,8 +149,8 @@ int Saig_ManAddUniqueness( sat_solver * pSat, Vec_Int_t * vState, int nRegs, int int Saig_ManInduction( Aig_Man_t * p, int nTimeOut, int nFramesMax, int nConfMax, int fUnique, int fUniqueAll, int fGetCex, int fVerbose, int fVeryVerbose ) { sat_solver * pSat; - Aig_Man_t * pAigPart; - Cnf_Dat_t * pCnfPart; + Aig_Man_t * pAigPart = NULL; + Cnf_Dat_t * pCnfPart = NULL; Vec_Int_t * vTopVarNums, * vState, * vTopVarIds = NULL; Vec_Ptr_t * vTop, * vBot; Aig_Obj_t * pObjPi, * pObjPiCopy, * pObjPo; diff --git a/src/aig/saig/saigSynch.c b/src/aig/saig/saigSynch.c index 02b8ed12..b239d3a6 100644 --- a/src/aig/saig/saigSynch.c +++ b/src/aig/saig/saigSynch.c @@ -407,7 +407,7 @@ Vec_Str_t * Saig_SynchSequence( Aig_Man_t * pAig, int nWords ) int fVerify = 1; // verify the resulting pattern Vec_Str_t * vSequence; Vec_Ptr_t * vSimInfo; - int nTerPrev, nTerCur, nTerCur2; + int nTerPrev, nTerCur = 0, nTerCur2; int iPatBest, RetValue, s, t; assert( Saig_ManRegNum(pAig) > 0 ); // reset random numbers diff --git a/src/base/abc/abcNtk.c b/src/base/abc/abcNtk.c index 687d130f..07ee429b 100644 --- a/src/base/abc/abcNtk.c +++ b/src/base/abc/abcNtk.c @@ -1857,7 +1857,7 @@ Vec_Int_t * Abc_NtkReadFlopPerm( char * pFileName, int nFlops ) char Buffer[1000]; FILE * pFile; Vec_Int_t * vFlops; - int iFlop; + int iFlop = -1; pFile = fopen( pFileName, "rb" ); if ( pFile == NULL ) { diff --git a/src/base/abci/abcRec.c b/src/base/abci/abcRec.c index b86b7b04..4cc1b86e 100644 --- a/src/base/abci/abcRec.c +++ b/src/base/abci/abcRec.c @@ -300,7 +300,7 @@ char If_CutDepthRecComput_rec(Abc_Obj_t* pObj, int iLeaf) Depth1 = If_CutDepthRecComput_rec(Abc_ObjFanin1(pObj), iLeaf); Depth = Abc_MaxInt(Depth0, Depth1); Depth = (Depth == -IF_BIG_CHAR) ? -IF_BIG_CHAR : Depth + 1; - assert(Depth <= 127); +// assert(Depth <= 127); return Depth; } @@ -324,7 +324,7 @@ unsigned char Abc_NtkRecAreaAndMark_rec(Abc_Obj_t* pObj) Area0 = Abc_NtkRecAreaAndMark_rec(Abc_ObjFanin0(pObj)); Area1 = Abc_NtkRecAreaAndMark_rec(Abc_ObjFanin1(pObj)); Area = Area1 + Area0 + 1; - assert(Area <= 255); +// assert(Area <= 255); pObj->fMarkA = 1; return Area; } @@ -2642,7 +2642,7 @@ char Abc_NtkRecCurrentDepth_rec(If_Obj_t * pObj, int iLeaf) Depth1 = Abc_NtkRecCurrentDepth_rec(If_ObjFanin1(pObj), iLeaf); Depth = Abc_MaxInt(Depth0, Depth1); Depth = (Depth == -IF_BIG_CHAR) ? -IF_BIG_CHAR : Depth + 1; - assert(Depth <= 127); +// assert(Depth <= 127); return Depth; } @@ -3107,3 +3107,4 @@ int If_CutDelayRecCost(If_Man_t* p, If_Cut_t* pCut, If_Obj_t * pObj) ABC_NAMESPACE_IMPL_END + diff --git a/src/base/abci/abcRec2.c b/src/base/abci/abcRec2.c index 66e1e8a6..cdc1fe13 100644 --- a/src/base/abci/abcRec2.c +++ b/src/base/abci/abcRec2.c @@ -702,7 +702,7 @@ static unsigned char Abc_NtkRecAreaAndMark_rec(Gia_Obj_t* pObj) Area0 = Abc_NtkRecAreaAndMark_rec(Gia_ObjFanin0(pObj)); Area1 = Abc_NtkRecAreaAndMark_rec(Gia_ObjFanin1(pObj)); Area = Area1 + Area0 + 1; - assert(Area <= 255); +// assert(Area <= 255); pObj->fMark0 = 1; return Area; } @@ -771,7 +771,7 @@ char If_CutDepthRecComput_rec2(Gia_Obj_t* pObj, int iLeaf) Depth1 = If_CutDepthRecComput_rec2(Gia_ObjFanin1(pObj), iLeaf); Depth = Abc_MaxInt(Depth0, Depth1); Depth = (Depth == -IF_BIG_CHAR) ? -IF_BIG_CHAR : Depth + 1; - assert(Depth <= 127); +// assert(Depth <= 127); return Depth; } @@ -2439,4 +2439,4 @@ void Abc_NtkRecLibMerge2(Gia_Man_t* pGia2) -ABC_NAMESPACE_IMPL_END \ No newline at end of file +ABC_NAMESPACE_IMPL_END diff --git a/src/base/io/ioWriteBook.c b/src/base/io/ioWriteBook.c index 92f49d62..8dacbc12 100644 --- a/src/base/io/ioWriteBook.c +++ b/src/base/io/ioWriteBook.c @@ -201,10 +201,12 @@ unsigned Io_NtkWriteNodes( FILE * pFile, Abc_Ntk_t * pNtk ) Io_NtkWritePiPoNodes( pFile, pNtk ); // write the latches if ( !Abc_NtkIsComb(pNtk) ) - Abc_NtkForEachLatch( pNtk, pLatch, i ) { - Io_NtkWriteLatchNode( pFile, pLatch, NODES ); - coreCellArea+=6*coreHeight; + Abc_NtkForEachLatch( pNtk, pLatch, i ) + { + Io_NtkWriteLatchNode( pFile, pLatch, NODES ); + coreCellArea+=6*coreHeight; + } } // write each internal node pProgress = Extra_ProgressBarStart( stdout, Abc_NtkNodeNum(pNtk) ); @@ -692,11 +694,13 @@ void Io_NtkWritePl( FILE * pFile, Abc_Ntk_t * pNtk, unsigned numTerms, double la } if( !Abc_NtkIsComb(pNtk) ) + { Abc_NtkForEachLatch( pNtk, pLatch, i ) { Io_NtkWriteLatchNode( pFile, pLatch, PL ); fprintf( pFile, "\t%d\t\t%d\t: %s\n", 0, 0, "N" ); } + } Abc_NtkForEachNode( pNtk, pNode, i ) { @@ -724,7 +728,7 @@ Vec_Ptr_t * Io_NtkOrderingPads( Abc_Ntk_t * pNtk, Vec_Ptr_t * vTerms ) int * pOrdered = ABC_ALLOC(int, numTerms); int newNeighbor=1; Vec_Ptr_t * vOrderedTerms = Vec_PtrAlloc ( numTerms ); - Abc_Obj_t * pNeighbor, * pNextTerm; + Abc_Obj_t * pNeighbor = NULL, * pNextTerm; unsigned i; for( i=0 ; iiCube ); if ( pCube->pVar->ppPairs ) + { Fxu_CubeForEachPair( pCube, pPair, i ) fprintf( pFile, " <%d %d> (d=%d) (b=%d)", pPair->iCube1, pPair->iCube2, pPair->pDiv->Num, pPair->nBase ); + } fprintf( pFile, "\n" ); } fprintf( pFile, "\n" ); diff --git a/src/proof/llb/llb1Reach.c b/src/proof/llb/llb1Reach.c index 2acd3020..fae7bee2 100644 --- a/src/proof/llb/llb1Reach.c +++ b/src/proof/llb/llb1Reach.c @@ -46,7 +46,7 @@ DdNode * Llb_ManConstructOutBdd( Aig_Man_t * pAig, Aig_Obj_t * pNode, DdManager { DdNode * bBdd0, * bBdd1, * bFunc; Vec_Ptr_t * vNodes; - Aig_Obj_t * pObj; + Aig_Obj_t * pObj = NULL; int i; abctime TimeStop; if ( Aig_ObjFanin0(pNode) == Aig_ManConst1(pAig) ) diff --git a/src/proof/llb/llb2Flow.c b/src/proof/llb/llb2Flow.c index 9fa40b9e..64db32b3 100644 --- a/src/proof/llb/llb2Flow.c +++ b/src/proof/llb/llb2Flow.c @@ -32,7 +32,7 @@ static inline Aig_Obj_t * Llb_ObjGetPath( Aig_Obj_t * pObj ) static inline Aig_Obj_t * Llb_ObjGetFanoutPath( Aig_Man_t * p, Aig_Obj_t * pObj ) { Aig_Obj_t * pFanout; - int i, iFanout; + int i, iFanout = -1; assert( Llb_ObjGetPath(pObj) ); Aig_ObjForEachFanout( p, pObj, pFanout, iFanout, i ) if ( Llb_ObjGetPath(pFanout) == pObj ) @@ -191,7 +191,8 @@ Vec_Ptr_t * Llb_ManCutMap( Aig_Man_t * p, Vec_Ptr_t * vResult, Vec_Ptr_t * vSupp } printf( "\n" ); - if ( fShowMatrix ) + if ( !fShowMatrix ) + return vMaps; Aig_ManForEachObj( p, pObj, i ) { if ( !Aig_ObjIsCi(pObj) && !Aig_ObjIsNode(pObj) ) diff --git a/src/proof/llb/llb2Image.c b/src/proof/llb/llb2Image.c index 36ff2df5..e245ba36 100644 --- a/src/proof/llb/llb2Image.c +++ b/src/proof/llb/llb2Image.c @@ -81,7 +81,8 @@ Vec_Ptr_t * Llb_ImgSupports( Aig_Man_t * p, Vec_Ptr_t * vDdMans, Vec_Int_t * vSt // print supports assert( nSize == Aig_ManObjNumMax(p) ); - if ( fVerbose ) + if ( !fVerbose ) + return vSupps; Aig_ManForEachObj( p, pObj, i ) { int k, Counter = 0; -- cgit v1.2.3