diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/aig/gia/giaIf.c | 2 | ||||
-rw-r--r-- | src/aig/miniaig/ndr.h | 16 | ||||
-rw-r--r-- | src/base/acb/acbAbc.c | 2 | ||||
-rw-r--r-- | src/misc/util/abc_global.h | 10 |
4 files changed, 15 insertions, 15 deletions
diff --git a/src/aig/gia/giaIf.c b/src/aig/gia/giaIf.c index 0e4686d8..d45fcb17 100644 --- a/src/aig/gia/giaIf.c +++ b/src/aig/gia/giaIf.c @@ -1953,7 +1953,7 @@ Gia_Man_t * Gia_ManFromIfLogic( If_Man_t * pIfMan ) { FILE * pFile; int status; char * pStr, Buffer[1000] = {0}; - char * pNameGen = pIfMan->pName? Extra_FileNameGeneric( pIfMan->pName ) : "nameless_"; + const char * pNameGen = pIfMan->pName? Extra_FileNameGeneric( pIfMan->pName ) : "nameless_"; sprintf( Buffer, "%s_configs.txt", pNameGen ); ABC_FREE( pNameGen ); pFile = fopen( Buffer, "wb" ); diff --git a/src/aig/miniaig/ndr.h b/src/aig/miniaig/ndr.h index 9e85c870..22aa33e3 100644 --- a/src/aig/miniaig/ndr.h +++ b/src/aig/miniaig/ndr.h @@ -33,7 +33,7 @@ #include "abcOper.h" -//ABC_NAMESPACE_HEADER_START +ABC_NAMESPACE_HEADER_START #ifdef _WIN32 #define inline __inline @@ -390,11 +390,11 @@ static inline void Ndr_ModuleWriteVerilog( char * pFileName, void * pModule, cha // creating a new module (returns pointer to the memory buffer storing the module info) static inline void * Ndr_ModuleCreate( int Name ) { - Ndr_Data_t * p = malloc( sizeof(Ndr_Data_t) ); + Ndr_Data_t * p = ABC_ALLOC( Ndr_Data_t, 1 ); p->nSize = 0; p->nCap = 16; - p->pHead = malloc( p->nCap ); - p->pBody = malloc( p->nCap * 4 ); + p->pHead = ABC_ALLOC( unsigned char, p->nCap ); + p->pBody = ABC_ALLOC( unsigned int, p->nCap * 4 ); Ndr_DataPush( p, NDR_MODULE, 0 ); Ndr_DataPush( p, NDR_NAME, Name ); Ndr_DataAddTo( p, 0, p->nSize ); @@ -453,10 +453,10 @@ static inline void * Ndr_ModuleRead( char * pFileName ) assert( nFileSize % 5 == 0 ); rewind( pFile ); // create structure - p = malloc( sizeof(Ndr_Data_t) ); + p = ABC_ALLOC( Ndr_Data_t, 1 ); p->nSize = p->nCap = nFileSize / 5; - p->pHead = malloc( p->nCap ); - p->pBody = malloc( p->nCap * 4 ); + p->pHead = ABC_ALLOC( unsigned char, p->nCap ); + p->pBody = ABC_ALLOC( unsigned int, p->nCap * 4 ); RetValue = (int)fread( p->pBody, 4, p->nCap, pFile ); RetValue = (int)fread( p->pHead, 1, p->nCap, pFile ); assert( p->nSize == (int)p->pBody[0] ); @@ -511,7 +511,7 @@ static inline void Ndr_ModuleTest() } -//ABC_NAMESPACE_HEADER_END +ABC_NAMESPACE_HEADER_END #endif diff --git a/src/base/acb/acbAbc.c b/src/base/acb/acbAbc.c index 7b215a56..b3fddcac 100644 --- a/src/base/acb/acbAbc.c +++ b/src/base/acb/acbAbc.c @@ -192,7 +192,7 @@ Acb_Ntk_t * Acb_NtkFromNdr( char * pFileName, void * pModule, Abc_Nam_t * pNames NameId = Ndr_ObjReadBody( p, Obj, NDR_OUTPUT ); nArray = Ndr_ObjReadArray( p, Obj, NDR_INPUT, &pArray ); Type = Ndr_ObjReadBody( p, Obj, NDR_OPERTYPE ); - ObjId = Acb_ObjAlloc( pNtk, Type, nArray, 0 ); + ObjId = Acb_ObjAlloc( pNtk, (Acb_ObjType_t) Type, nArray, 0 ); Vec_IntWriteEntry( vMap, NameId, ObjId ); Acb_ObjSetName( pNtk, ObjId, NameId ); } diff --git a/src/misc/util/abc_global.h b/src/misc/util/abc_global.h index b68d7b4c..fad76ffc 100644 --- a/src/misc/util/abc_global.h +++ b/src/misc/util/abc_global.h @@ -103,7 +103,7 @@ ABC_NAMESPACE_HEADER_START */ #if defined(__ccdoc__) typedef platform_dependent_type ABC_PTRDIFF_T; -#elif defined(LIN64) +#elif defined(LIN64) || defined(__x86_64__) typedef long ABC_PTRDIFF_T; #elif defined(NT64) typedef long long ABC_PTRDIFF_T; @@ -120,7 +120,7 @@ typedef int ABC_PTRDIFF_T; */ #if defined(__ccdoc__) typedef platform_dependent_type ABC_PTRUINT_T; -#elif defined(LIN64) +#elif defined(LIN64) || defined(__x86_64__) typedef unsigned long ABC_PTRUINT_T; #elif defined(NT64) typedef unsigned long long ABC_PTRUINT_T; @@ -137,7 +137,7 @@ typedef unsigned int ABC_PTRUINT_T; */ #if defined(__ccdoc__) typedef platform_dependent_type ABC_PTRINT_T; -#elif defined(LIN64) +#elif defined(LIN64) || defined(__x86_64__) typedef long ABC_PTRINT_T; #elif defined(NT64) typedef long long ABC_PTRINT_T; @@ -152,7 +152,7 @@ typedef int ABC_PTRINT_T; */ #if defined(__ccdoc__) typedef platform_dependent_type ABC_INT64_T; -#elif defined(LIN64) +#elif defined(LIN64) || defined(__x86_64__) typedef long ABC_INT64_T; #elif defined(NT64) || defined(LIN) typedef long long ABC_INT64_T; @@ -167,7 +167,7 @@ typedef signed __int64 ABC_INT64_T; */ #if defined(__ccdoc__) typedef platform_dependent_type ABC_UINT64_T; -#elif defined(LIN64) +#elif defined(LIN64) || defined(__x86_64__) typedef unsigned long ABC_UINT64_T; #elif defined(NT64) || defined(LIN) typedef unsigned long long ABC_UINT64_T; |