diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2015-07-08 15:04:26 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2015-07-08 15:04:26 -0700 |
commit | 609be7a1144a898143819842e34e637865d4e24b (patch) | |
tree | 1830448562b2c0513b6acef7897193004d915dd5 /src/base/cba | |
parent | 4f2d2e0e962a395174679def7cf4de217f559635 (diff) | |
download | abc-609be7a1144a898143819842e34e637865d4e24b.tar.gz abc-609be7a1144a898143819842e34e637865d4e24b.tar.bz2 abc-609be7a1144a898143819842e34e637865d4e24b.zip |
C++ compiler typecast problem.
Diffstat (limited to 'src/base/cba')
-rw-r--r-- | src/base/cba/cbaCom.c | 2 | ||||
-rw-r--r-- | src/base/cba/cbaNtk.c | 8 | ||||
-rw-r--r-- | src/base/cba/cbaPrsBuild.c | 2 | ||||
-rw-r--r-- | src/base/cba/cbaPrsTrans.c | 2 | ||||
-rw-r--r-- | src/base/cba/cbaPtrAbc.c | 6 | ||||
-rw-r--r-- | src/base/cba/cbaWriteVer.c | 4 |
6 files changed, 12 insertions, 12 deletions
diff --git a/src/base/cba/cbaCom.c b/src/base/cba/cbaCom.c index 0c9c2ce9..7977f13c 100644 --- a/src/base/cba/cbaCom.c +++ b/src/base/cba/cbaCom.c @@ -486,7 +486,7 @@ int Cba_CommandGet( Abc_Frame_t * pAbc, int argc, char ** argv ) Abc_Print( 1, "Cba_CommandGet(): There is no current mapped design.\n" ); return 0; } - pNew = Cba_ManInsertAbc( p, pAbc->pNtkCur ); + pNew = (Cba_Man_t *)Cba_ManInsertAbc( p, pAbc->pNtkCur ); } else { diff --git a/src/base/cba/cbaNtk.c b/src/base/cba/cbaNtk.c index 93f33839..09f1aea1 100644 --- a/src/base/cba/cbaNtk.c +++ b/src/base/cba/cbaNtk.c @@ -130,10 +130,10 @@ static inline int Cba_GetTypeId( Cba_ObjType_t Type ) } void Cba_ManSetupTypes( char ** pNames, char ** pSymbs ) { - int Type, Id; + Cba_ObjType_t Type; for ( Type = 1; Type < CBA_BOX_UNKNOWN; Type++ ) { - Id = Cba_GetTypeId( Type ); + int Id = Cba_GetTypeId( Type ); pNames[Type] = s_Types[Id].pName; pSymbs[Type] = s_Types[Id].pSymb; } @@ -160,7 +160,7 @@ char * Cba_NtkGenerateName( Cba_Ntk_t * p, Cba_ObjType_t Type, Vec_Int_t * vBits Cba_ObjType_t Cba_NameToType( char * pName ) { - int i; + Cba_ObjType_t i; if ( strncmp(pName, s_Pref, strlen(s_Pref)) ) return 0; pName += strlen(s_Pref); @@ -332,7 +332,7 @@ void Cba_ManAssignInternWordNamesNtk( Cba_Ntk_t * p, Vec_Int_t * vMap ) { //int Type = Cba_ObjType(p, iObj); int Range = Cba_ObjIsPi(p, iObj) ? Cba_ObjPiRange(p, iObj) : Cba_BoxBoRange(p, iObj); - iName = Cba_ManAssignInternTwo( p, nNames++, nDigits, Cba_ObjIsPi(p, iObj) ? "i":"n", vMap ); + iName = Cba_ManAssignInternTwo( p, nNames++, nDigits, (char*)(Cba_ObjIsPi(p, iObj) ? "i":"n"), vMap ); if ( Range == 1 ) Cba_ObjSetName( p, iObj, Abc_Var2Lit2(iName, CBA_NAME_BIN) ); else diff --git a/src/base/cba/cbaPrsBuild.c b/src/base/cba/cbaPrsBuild.c index b5ce2a0c..a74088fa 100644 --- a/src/base/cba/cbaPrsBuild.c +++ b/src/base/cba/cbaPrsBuild.c @@ -235,7 +235,7 @@ void Prs_ManBuildNtk( Cba_Ntk_t * pNew, Vec_Ptr_t * vDes, Prs_Ntk_t * pNtk, Vec_ } else { - iObj = Cba_BoxAlloc( pNew, Prs_BoxNtk(pNtk, iBox), Prs_BoxIONum(pNtk, iBox)-1, 1, -1 ); + iObj = Cba_BoxAlloc( pNew, (Cba_ObjType_t)Prs_BoxNtk(pNtk, iBox), Prs_BoxIONum(pNtk, iBox)-1, 1, -1 ); // consider box output NameId = Vec_IntEntryLast( vSigs ); NameId = Prs_NtkSigName( pNtk, NameId ); diff --git a/src/base/cba/cbaPrsTrans.c b/src/base/cba/cbaPrsTrans.c index b9def0e6..02cb4403 100644 --- a/src/base/cba/cbaPrsTrans.c +++ b/src/base/cba/cbaPrsTrans.c @@ -167,7 +167,7 @@ static inline int Prs_ManRangeSizeConcat( Prs_Ntk_t * p, int Con ) static inline int Prs_ManRangeSizeSignal( Prs_Ntk_t * p, int Sig ) { int Value = Abc_Lit2Var2( Sig ); - Prs_ManType_t Type = Abc_Lit2Att2( Sig ); + Prs_ManType_t Type = (Prs_ManType_t)Abc_Lit2Att2( Sig ); if ( Type == CBA_PRS_NAME ) return Prs_ManRangeSizeName( p, Value ); if ( Type == CBA_PRS_SLICE ) diff --git a/src/base/cba/cbaPtrAbc.c b/src/base/cba/cbaPtrAbc.c index c35bb6d7..2ca60d0b 100644 --- a/src/base/cba/cbaPtrAbc.c +++ b/src/base/cba/cbaPtrAbc.c @@ -121,10 +121,10 @@ Vec_Ptr_t * Ptr_AbcDeriveNode( Abc_Obj_t * pObj ) assert( Abc_ObjFaninNum(pObj) <= 2 ); Abc_ObjForEachFanin( pObj, pFanin, i ) { - Vec_PtrPush( vNode, i ? "r" : "l" ); + Vec_PtrPush( vNode, (void*)(i ? "r" : "l") ); Vec_PtrPush( vNode, Ptr_AbcObjName(pFanin) ); } - Vec_PtrPush( vNode, "o" ); + Vec_PtrPush( vNode, (void*)("o") ); Vec_PtrPush( vNode, Ptr_AbcObjName(pObj) ); assert( Ptr_CheckArray(vNode) ); return vNode; @@ -305,7 +305,7 @@ int Cba_NtkDeriveFromPtr( Cba_Ntk_t * pNtk, Vec_Ptr_t * vNtk, Vec_Int_t * vMap, int NtkId = Cba_ManNtkFindId( pNtk->pDesign, pBoxNtk ); assert( Vec_PtrSize(vBox) % 2 == 0 ); assert( nOutputs > 0 && 2*(nOutputs + 1) <= Vec_PtrSize(vBox) ); - iObj = Cba_BoxAlloc( pNtk, Ptr_NameToType(pBoxNtk), nInputs, nOutputs, NtkId ); + iObj = Cba_BoxAlloc( pNtk, (Cba_ObjType_t)Ptr_NameToType(pBoxNtk), nInputs, nOutputs, NtkId ); if ( NtkId > 0 ) Cba_NtkSetHost( Cba_ManNtk(pNtk->pDesign, NtkId), Cba_NtkId(pNtk), iObj ); Cba_ObjSetName( pNtk, iObj, Abc_Var2Lit2(Abc_NamStrFindOrAdd(pNtk->pDesign->pStrs, pBoxName, NULL), CBA_NAME_BIN) ); diff --git a/src/base/cba/cbaWriteVer.c b/src/base/cba/cbaWriteVer.c index f735257a..dfc6c87c 100644 --- a/src/base/cba/cbaWriteVer.c +++ b/src/base/cba/cbaWriteVer.c @@ -55,7 +55,7 @@ void Prs_ManWriteVerilogConcat( FILE * pFile, Prs_Ntk_t * p, int Con ) void Prs_ManWriteVerilogSignal( FILE * pFile, Prs_Ntk_t * p, int Sig ) { int Value = Abc_Lit2Var2( Sig ); - Prs_ManType_t Type = Abc_Lit2Att2( Sig ); + Prs_ManType_t Type = (Prs_ManType_t)Abc_Lit2Att2( Sig ); if ( Type == CBA_PRS_NAME || Type == CBA_PRS_CONST ) fprintf( pFile, "%s", Prs_NtkStr(p, Value) ); else if ( Type == CBA_PRS_SLICE ) @@ -110,7 +110,7 @@ void Prs_ManWriteVerilogBoxes( FILE * pFile, Prs_Ntk_t * p ) Vec_Int_t * vBox; int i; Prs_NtkForEachBox( p, vBox, i ) { - int NtkId = Prs_BoxNtk(p, i); + Cba_ObjType_t NtkId = Prs_BoxNtk(p, i); if ( NtkId == CBA_BOX_MUX ) Prs_ManWriteVerilogMux( pFile, p, vBox ); else if ( Prs_BoxIsNode(p, i) ) // node ------- check order of fanins |