From 8810ef12da3f56523a95863d6583f09531dfe8de Mon Sep 17 00:00:00 2001 From: Baruch Sterin Date: Fri, 16 Oct 2015 14:02:30 -0700 Subject: Fix C++ compilation errors --- src/aig/miniaig/miniaig.h | 4 ++++ src/base/bac/bacNtk.c | 11 +++++------ src/base/wlc/wlcReadSmt.c | 5 ++--- 3 files changed, 11 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/aig/miniaig/miniaig.h b/src/aig/miniaig/miniaig.h index 4c8a9203..dadb578b 100644 --- a/src/aig/miniaig/miniaig.h +++ b/src/aig/miniaig/miniaig.h @@ -30,6 +30,8 @@ #include #include +ABC_NAMESPACE_HEADER_START + //////////////////////////////////////////////////////////////////////// /// PARAMETERS /// //////////////////////////////////////////////////////////////////////// @@ -268,6 +270,8 @@ static int Mini_AigCheck( Mini_Aig_t * p ) /// FUNCTION DECLARATIONS /// //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_HEADER_END + #endif //////////////////////////////////////////////////////////////////////// diff --git a/src/base/bac/bacNtk.c b/src/base/bac/bacNtk.c index 4d2cd665..cd08b0b6 100644 --- a/src/base/bac/bacNtk.c +++ b/src/base/bac/bacNtk.c @@ -130,10 +130,10 @@ static inline int Bac_GetTypeId( Bac_ObjType_t Type ) } void Bac_ManSetupTypes( char ** pNames, char ** pSymbs ) { - Bac_ObjType_t Type; + int Type; for ( Type = 1; Type < BAC_BOX_UNKNOWN; Type++ ) { - int Id = Bac_GetTypeId( Type ); + int Id = Bac_GetTypeId( (Bac_ObjType_t)Type ); pNames[Type] = s_Types[Id].pName; pSymbs[Type] = s_Types[Id].pSymb; } @@ -160,14 +160,14 @@ char * Bac_NtkGenerateName( Bac_Ntk_t * p, Bac_ObjType_t Type, Vec_Int_t * vBits Bac_ObjType_t Bac_NameToType( char * pName ) { - Bac_ObjType_t i; + int i; if ( strncmp(pName, s_Pref, strlen(s_Pref)) ) - return 0; + return BAC_OBJ_NONE; pName += strlen(s_Pref); for ( i = 1; i < BAC_BOX_UNKNOWN; i++ ) if ( !strncmp(pName, s_Types[i].pName, strlen(s_Types[i].pName)) ) return s_Types[i].Type; - return 0; + return BAC_OBJ_NONE; } Vec_Int_t * Bac_NameToRanges( char * pName ) { @@ -601,4 +601,3 @@ Bac_Man_t * Bac_ManCollapse( Bac_Man_t * p ) ABC_NAMESPACE_IMPL_END - diff --git a/src/base/wlc/wlcReadSmt.c b/src/base/wlc/wlcReadSmt.c index e7ee4d16..2c158a48 100644 --- a/src/base/wlc/wlcReadSmt.c +++ b/src/base/wlc/wlcReadSmt.c @@ -91,9 +91,9 @@ static inline char * Smt_GetTypeName( Smt_LineType_t Type ) } static inline void Smt_AddTypes( Abc_Nam_t * p ) { - Smt_LineType_t Type; + int Type; for ( Type = 1; Type < SMT_PRS_END; Type++ ) - Abc_NamStrFindOrAdd( p, Smt_GetTypeName(Type), NULL ); + Abc_NamStrFindOrAdd( p, Smt_GetTypeName((Smt_LineType_t)Type), NULL ); assert( Abc_NamObjNumMax(p) == SMT_PRS_END ); } @@ -911,4 +911,3 @@ Wlc_Ntk_t * Wlc_ReadSmt( char * pFileName ) ABC_NAMESPACE_IMPL_END - -- cgit v1.2.3