summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2019-03-12 23:25:20 +0100
committerAlan Mishchenko <alanmi@berkeley.edu>2019-03-12 23:25:20 +0100
commite3cd1048107824bb060c9ade2b1ab66a3c219801 (patch)
treefe6bd8835ab452544038ad5b40fdcbd3ddedc99d /src
parent900fd5cc734524b24ffd08c3fb626fd4a5ad8f6c (diff)
downloadabc-e3cd1048107824bb060c9ade2b1ab66a3c219801.tar.gz
abc-e3cd1048107824bb060c9ade2b1ab66a3c219801.tar.bz2
abc-e3cd1048107824bb060c9ade2b1ab66a3c219801.zip
Updated NPN classification code (compiler warnings).
Diffstat (limited to 'src')
-rw-r--r--src/base/abci/abcNpn.c4
-rw-r--r--src/opt/dau/dauCanon.c3
-rw-r--r--src/opt/dau/dauNpn2.c6
3 files changed, 7 insertions, 6 deletions
diff --git a/src/base/abci/abcNpn.c b/src/base/abci/abcNpn.c
index a3571a04..e109a9cf 100644
--- a/src/base/abci/abcNpn.c
+++ b/src/base/abci/abcNpn.c
@@ -317,7 +317,7 @@ void Abc_TruthNpnPerform( Abc_TtStore_t * p, int NpnType, int fVerbose )
}
else if ( NpnType == 8 )
{
- typedef unsigned(*TtCanonicizeFunc)(Abc_TtHieMan_t * p, word * pTruth, int nVars, char * pCanonPerm, int flag);
+// typedef unsigned(*TtCanonicizeFunc)(Abc_TtHieMan_t * p, word * pTruth, int nVars, char * pCanonPerm, int flag);
unsigned Abc_TtCanonicizeWrap(TtCanonicizeFunc func, Abc_TtHieMan_t * p, word * pTruth, int nVars, char * pCanonPerm, int flag);
unsigned Abc_TtCanonicizeAda(Abc_TtHieMan_t * p, word * pTruth, int nVars, char * pCanonPerm, int iThres);
@@ -335,7 +335,7 @@ void Abc_TruthNpnPerform( Abc_TtStore_t * p, int NpnType, int fVerbose )
}
else if ( NpnType == 9 || NpnType == 10 || NpnType == 11 )
{
- typedef unsigned(*TtCanonicizeFunc)(Abc_TtHieMan_t * p, word * pTruth, int nVars, char * pCanonPerm, int flag);
+// typedef unsigned(*TtCanonicizeFunc)(Abc_TtHieMan_t * p, word * pTruth, int nVars, char * pCanonPerm, int flag);
unsigned Abc_TtCanonicizeWrap(TtCanonicizeFunc func, Abc_TtHieMan_t * p, word * pTruth, int nVars, char * pCanonPerm, int flag);
unsigned Abc_TtCanonicizeAda(Abc_TtHieMan_t * p, word * pTruth, int nVars, char * pCanonPerm, int iThres);
unsigned Abc_TtCanonicizeCA(Abc_TtHieMan_t * p, word * pTruth, int nVars, char * pCanonPerm, int iThres);
diff --git a/src/opt/dau/dauCanon.c b/src/opt/dau/dauCanon.c
index 2b5b9838..8f11614c 100644
--- a/src/opt/dau/dauCanon.c
+++ b/src/opt/dau/dauCanon.c
@@ -1274,6 +1274,7 @@ void Abc_TtHieManStop(Abc_TtHieMan_t * p)
Vec_MemFreeP(&p->vTtMem[i]);
Vec_IntFree(p->vRepres[i]);
}
+ Vec_IntFree( p->vPhase );
ABC_FREE(p);
}
@@ -1520,7 +1521,7 @@ static int Abc_NextPermSwapC(char * pData, signed char * pDir, int size)
return j < k ? j : k;
}
-typedef unsigned(*TtCanonicizeFunc)(Abc_TtHieMan_t * p, word * pTruth, int nVars, char * pCanonPerm, int flag);
+//typedef unsigned(*TtCanonicizeFunc)(Abc_TtHieMan_t * p, word * pTruth, int nVars, char * pCanonPerm, int flag);
unsigned Abc_TtCanonicizeWrap(TtCanonicizeFunc func, Abc_TtHieMan_t * p, word * pTruth, int nVars, char * pCanonPerm, int flag)
{
int nWords = Abc_TtWordNum(nVars);
diff --git a/src/opt/dau/dauNpn2.c b/src/opt/dau/dauNpn2.c
index cf6a4f60..ff3bf8f4 100644
--- a/src/opt/dau/dauNpn2.c
+++ b/src/opt/dau/dauNpn2.c
@@ -774,7 +774,7 @@ void Dtt_MakeFormulaFI2( unsigned tFun, Dtt_FunImpl_t* pFun, Vec_Vec_t* vLibImpl
{
int j;
Dtt_FunImpl_t* pImpl2;
- char sFI2[100]; sprintf( sFI2, "" );
+ char sFI2[100] = {0}; //sprintf( sFI2, "" );
if ( pFun->FI2 == 0 ) // PI
{
@@ -799,7 +799,7 @@ void Dtt_MakeFormula( unsigned tFun, Dtt_FunImpl_t* pFun, Vec_Vec_t* vLibImpl, i
{
int j;
Dtt_FunImpl_t* pImpl1;
- char sFI1[100], sCopy[100]; sprintf( sFI1, "" );
+ char sFI1[100], sCopy[100] = {0}; //sprintf( sFI1, "" );
if ( pFun->FI1 == 0 ) // PI
{
@@ -986,7 +986,7 @@ void Dtt_DumpLibrary( Dtt_Man_t * p )
if ( i<2 ) continue; // skip const 0 and buffer
Vec_VecForEachEntryLevel( Dtt_FunImpl_t*, vLibImpl, pFun, j, i )
{
- sprintf( str, "" );
+ str[0] = 0; //sprintf( str, "" );
Dtt_MakeFormula( (unsigned)Entry, pFun, vLibImpl, (4<<16)+(3<<12)+(2<<8)+(1<<4), str, 1, pFile );
}
}