diff options
author | Baruch Sterin <baruchs@gmail.com> | 2015-11-05 01:23:31 -0800 |
---|---|---|
committer | Baruch Sterin <baruchs@gmail.com> | 2015-11-05 01:23:31 -0800 |
commit | c0ba25a69388765d7057ae8729e12b8a85435e35 (patch) | |
tree | 98c999fed9d9cf65b6425334e819c8b339fc6025 /src/base/cba | |
parent | 8ee49ff150a12f7183fe25e0a8d8e845391c100b (diff) | |
download | abc-c0ba25a69388765d7057ae8729e12b8a85435e35.tar.gz abc-c0ba25a69388765d7057ae8729e12b8a85435e35.tar.bz2 abc-c0ba25a69388765d7057ae8729e12b8a85435e35.zip |
silence clang errors when compiling as C++
Diffstat (limited to 'src/base/cba')
-rw-r--r-- | src/base/cba/cbaNtk.c | 7 | ||||
-rw-r--r-- | src/base/cba/cbaReadVer.c | 6 | ||||
-rw-r--r-- | src/base/cba/cbaWriteVer.c | 4 |
3 files changed, 9 insertions, 8 deletions
diff --git a/src/base/cba/cbaNtk.c b/src/base/cba/cbaNtk.c index d3ed96f5..fee91192 100644 --- a/src/base/cba/cbaNtk.c +++ b/src/base/cba/cbaNtk.c @@ -90,7 +90,8 @@ void Cba_NtkPrintDistrib( Cba_Ntk_t * p, int fVerbose ) Vec_Ptr_t * vTypes, * vOccurs; Vec_Int_t * vAnds = Vec_IntStart( CBA_BOX_LAST ); int iRnObj = -1, nCountRange = 0; - int i, k, s, s0, s1, Type; word Sign; + int i, k, s, s0, s1; word Sign; + Cba_ObjType_t Type; char * pTypeNames[CBA_BOX_LAST]; Cba_ManCreatePrimMap( pTypeNames ); // allocate statistics arrays @@ -1060,7 +1061,7 @@ Cba_Man_t * Cba_ManDeriveFromGia( Gia_Man_t * pGia, int fUseXor ) Cba_NtkCleanObjNames( pNtk ); Gia_ManForEachCiId( pGia, iObj, i ) { - NameId = pGia->vNamesIn? Abc_NamStrFindOrAdd(p->pStrs, Vec_PtrEntry(pGia->vNamesIn, i), NULL) : Cba_NtkNewStrId(pNtk, "i%d", i); + NameId = pGia->vNamesIn? Abc_NamStrFindOrAdd(p->pStrs, (char*)Vec_PtrEntry(pGia->vNamesIn, i), NULL) : Cba_NtkNewStrId(pNtk, "i%d", i); iObjNew = Cba_ObjAlloc( pNtk, CBA_OBJ_PI, 0, 1 ); Cba_ObjSetName( pNtk, iObjNew, NameId ); Vec_IntWriteEntry( vLit2Fon, Abc_Var2Lit(iObj, 0), Cba_ObjFon0(pNtk, iObjNew) ); @@ -1082,7 +1083,7 @@ Cba_Man_t * Cba_ManDeriveFromGia( Gia_Man_t * pGia, int fUseXor ) iObjNew = Cba_ObjAlloc( pNtk, CBA_BOX_BUF, 1, 1 ); Cba_ObjSetFinFon( pNtk, iObjNew, 0, iFon0 ); iFon0 = Cba_ObjFon0(pNtk, iObjNew); // non-const fon unique for this output - NameId = pGia->vNamesOut? Abc_NamStrFindOrAdd(p->pStrs, Vec_PtrEntry(pGia->vNamesOut, i), NULL) : Cba_NtkNewStrId(pNtk, "o%d", i); + NameId = pGia->vNamesOut? Abc_NamStrFindOrAdd(p->pStrs, (char*)Vec_PtrEntry(pGia->vNamesOut, i), NULL) : Cba_NtkNewStrId(pNtk, "o%d", i); iObjNew = Cba_ObjAlloc( pNtk, CBA_OBJ_PO, 1, 0 ); Cba_ObjSetName( pNtk, iObjNew, NameId ); Cba_ObjSetFinFon( pNtk, iObjNew, 0, iFon0 ); diff --git a/src/base/cba/cbaReadVer.c b/src/base/cba/cbaReadVer.c index 1cbf6b19..ec22e195 100644 --- a/src/base/cba/cbaReadVer.c +++ b/src/base/cba/cbaReadVer.c @@ -1879,7 +1879,7 @@ int Prs_CreateVerilogNtk( Cba_Ntk_t * p, Prs_Ntk_t * pNtk ) if ( Prs_BoxIsNode(pNtk, i) ) // node { Type = Prs_BoxNtk(pNtk, i); - iObj = Cba_ObjAlloc( p, Type, Prs_BoxIONum(pNtk, i)-1, Type == CBA_BOX_ADD ? 2 : 1 ); + iObj = Cba_ObjAlloc( p, (Cba_ObjType_t)Type, Prs_BoxIONum(pNtk, i)-1, Type == CBA_BOX_ADD ? 2 : 1 ); Prs_CreateSignalOut( p, Cba_ObjFon0(p, iObj), pNtk, Vec_IntEntry(vBox, 1) ); // node output } else // box @@ -1921,7 +1921,7 @@ int Prs_CreateVerilogNtk( Cba_Ntk_t * p, Prs_Ntk_t * pNtk ) else if ( (Type == CBA_BOX_DFFRS || Type == CBA_BOX_LATCHRS) && !strncmp(pNtkName, "wide_", strlen("wide_")) && !Prs_CreateFlopSetReset(p, pNtk, vBox, NULL, NULL, NULL, NULL) ) nInputs = atoi(pNtkName+strlen(Type == CBA_BOX_DFFRS ? "wide_dffrs_" : "wide_latchrs_")), nOutputs = 1, Type = CBA_BOX_CONCAT; // create object - iObj = Cba_ObjAlloc( p, Type, nInputs, nOutputs ); + iObj = Cba_ObjAlloc( p, (Cba_ObjType_t)Type, nInputs, nOutputs ); if ( pBox ) Cba_ObjSetFunc( p, iObj, Cba_NtkId(pBox) ); // mark PO objects Cba_NtkCleanMap2( p ); @@ -2002,7 +2002,7 @@ int Prs_CreateVerilogNtk( Cba_Ntk_t * p, Prs_Ntk_t * pNtk ) for ( w = 0; w < Width; w++ ) { // create bit-level flop - int iObjNew = Cba_ObjAlloc( p, Type, 4, 1 ); + int iObjNew = Cba_ObjAlloc( p, (Cba_ObjType_t)Type, 4, 1 ); if ( Prs_BoxName(pNtk, i) ) { NameId = Cba_NtkNewStrId( p, "%s[%d]", Prs_NtkStr(pNtk, Prs_BoxName(pNtk, i)), w ); diff --git a/src/base/cba/cbaWriteVer.c b/src/base/cba/cbaWriteVer.c index c6f7b2ac..45c8ed99 100644 --- a/src/base/cba/cbaWriteVer.c +++ b/src/base/cba/cbaWriteVer.c @@ -233,7 +233,7 @@ static void Prs_ManWriteVerilogBoxes( FILE * pFile, Prs_Ntk_t * p, char ** pType Vec_Int_t * vBox; int i, k; Prs_NtkForEachBox( p, vBox, i ) { - Cba_ObjType_t NtkId = Prs_BoxNtk(p, i); + Cba_ObjType_t NtkId = (Cba_ObjType_t)Prs_BoxNtk(p, i); //char * pNtkName = Prs_ObjGetName(p, Prs_BoxName(p, i)); if ( NtkId == CBA_BOX_MUX && Prs_BoxIsNode(p, i) ) Prs_ManWriteVerilogMux( pFile, p, vBox ); @@ -918,7 +918,7 @@ void Cba_ManWriteVerilogNtk( Cba_Ntk_t * p, int fInlineConcat ) Vec_StrPush( vStr, ' ' ); Cba_ManWriteFonName( p, Cba_ObjFinFon(p, iObj, 2), fInlineConcat, 0 ); } - else if ( Cba_TypeIsUnary(Type) ) + else if ( Cba_TypeIsUnary((Cba_ObjType_t)Type) ) { Vec_StrPrintStr( vStr, Cba_NtkTypeName(p, Type) ); Cba_ManWriteFonName( p, Cba_ObjFinFon(p, iObj, 0), fInlineConcat, 0 ); |