summaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2021-09-26 11:30:54 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2021-09-26 11:30:54 -0700
commitba64e78608064612db61d6515f19dd2cabe69cee (patch)
treed4df3672f9d056a010244711f73c848e020168e8 /src/base
parent2ce1ce8bed69623de58d9394e22a3a8812096561 (diff)
downloadabc-ba64e78608064612db61d6515f19dd2cabe69cee.tar.gz
abc-ba64e78608064612db61d6515f19dd2cabe69cee.tar.bz2
abc-ba64e78608064612db61d6515f19dd2cabe69cee.zip
Changing declaration of Vec_Ptr_t sorting function to satisfy some compilers.
Diffstat (limited to 'src/base')
-rw-r--r--src/base/abc/abcCheck.c4
-rw-r--r--src/base/abc/abcFanOrder.c4
-rw-r--r--src/base/abc/abcHie.c2
-rw-r--r--src/base/abc/abcHieNew.c4
-rw-r--r--src/base/abc/abcMinBase.c2
-rw-r--r--src/base/abci/abcBalance.c2
-rw-r--r--src/base/abci/abcDar.c2
-rw-r--r--src/base/abci/abcLutmin.c2
-rw-r--r--src/base/abci/abcMffc.c2
-rw-r--r--src/base/abci/abcNpnSave.c2
-rw-r--r--src/base/abci/abcStrash.c2
-rw-r--r--src/base/abci/abcSweep.c2
-rw-r--r--src/base/cba/cbaNtk.c2
-rw-r--r--src/base/wlc/wlcAbs.c8
14 files changed, 20 insertions, 20 deletions
diff --git a/src/base/abc/abcCheck.c b/src/base/abc/abcCheck.c
index 3e978bf0..a7448530 100644
--- a/src/base/abc/abcCheck.c
+++ b/src/base/abc/abcCheck.c
@@ -865,7 +865,7 @@ int Abc_NtkCheckUniqueCiNames( Abc_Ntk_t * pNtk )
vNames = Vec_PtrAlloc( Abc_NtkCiNum(pNtk) );
Abc_NtkForEachCi( pNtk, pObj, i )
Vec_PtrPush( vNames, Abc_ObjName(pObj) );
- Vec_PtrSort( vNames, (int (*)())Abc_NtkNamesCompare );
+ Vec_PtrSort( vNames, (int (*)(const void *, const void *))Abc_NtkNamesCompare );
for ( i = 1; i < Abc_NtkCiNum(pNtk); i++ )
if ( !strcmp( (const char *)Vec_PtrEntry(vNames,i-1), (const char *)Vec_PtrEntry(vNames,i) ) )
{
@@ -896,7 +896,7 @@ int Abc_NtkCheckUniqueCoNames( Abc_Ntk_t * pNtk )
vNames = Vec_PtrAlloc( Abc_NtkCoNum(pNtk) );
Abc_NtkForEachCo( pNtk, pObj, i )
Vec_PtrPush( vNames, Abc_ObjName(pObj) );
- Vec_PtrSort( vNames, (int (*)())Abc_NtkNamesCompare );
+ Vec_PtrSort( vNames, (int (*)(const void *, const void *))Abc_NtkNamesCompare );
for ( i = 1; i < Abc_NtkCoNum(pNtk); i++ )
{
// printf( "%s\n", Vec_PtrEntry(vNames,i) );
diff --git a/src/base/abc/abcFanOrder.c b/src/base/abc/abcFanOrder.c
index 12df7d85..949170aa 100644
--- a/src/base/abc/abcFanOrder.c
+++ b/src/base/abc/abcFanOrder.c
@@ -476,9 +476,9 @@ void Abc_NodeSortCubes( Abc_Obj_t * pNode, Vec_Ptr_t * vCubes, Vec_Str_t * vStor
Vec_PtrPush( vCubes, pCube );
}
if ( fWeight )
- Vec_PtrSort( vCubes, (int (*)())Abc_NodeCompareCubes2 );
+ Vec_PtrSort( vCubes, (int (*)(const void *, const void *))Abc_NodeCompareCubes2 );
else
- Vec_PtrSort( vCubes, (int (*)())Abc_NodeCompareCubes1 );
+ Vec_PtrSort( vCubes, (int (*)(const void *, const void *))Abc_NodeCompareCubes1 );
Vec_StrGrow( vStore, Vec_PtrSize(vCubes) * (nVars + 3) );
pPivot = Vec_StrArray( vStore );
Vec_PtrForEachEntry( char *, vCubes, pCube, i )
diff --git a/src/base/abc/abcHie.c b/src/base/abc/abcHie.c
index 8397301f..bd08c35d 100644
--- a/src/base/abc/abcHie.c
+++ b/src/base/abc/abcHie.c
@@ -442,7 +442,7 @@ void Abc_NtkPrintBoxInfo( Abc_Ntk_t * pNtk )
}
// sort models by name
vMods = pNtk->pDesign->vModules;
- Vec_PtrSort( vMods, (int(*)())Abc_NtkCompareNames );
+ Vec_PtrSort( vMods, (int(*)(const void *, const void *))Abc_NtkCompareNames );
// Vec_PtrForEachEntry( Abc_Ntk_t *, vMods, pModel, i )
// printf( "%s\n", Abc_NtkName(pModel) );
diff --git a/src/base/abc/abcHieNew.c b/src/base/abc/abcHieNew.c
index 0f191707..54a61609 100644
--- a/src/base/abc/abcHieNew.c
+++ b/src/base/abc/abcHieNew.c
@@ -558,7 +558,7 @@ void Au_ManPrintBoxInfo( Au_Ntk_t * pNtk )
vMods->nSize--;
vMods->pArray++;
// sort models by name
- Vec_PtrSort( vMods, (int(*)())Au_NtkCompareNames );
+ Vec_PtrSort( vMods, (int(*)(const void *, const void *))Au_NtkCompareNames );
// swap the first model
Num = Vec_PtrFind( vMods, pNtk );
assert( Num >= 0 && Num < Vec_PtrSize(vMods) );
@@ -643,7 +643,7 @@ void Au_ManPrintBoxInfoSorted( Au_Ntk_t * pNtk )
vMods->pArray--;
vMods->nSize++;
- Vec_PtrSort( vModsNew, (int(*)())Au_NtkCompareSign );
+ Vec_PtrSort( vModsNew, (int(*)(const void *, const void *))Au_NtkCompareSign );
Vec_PtrForEachEntryStart( Au_Ntk_t *, vModsNew, pModel, i, 1 )
{
printf( "MODULE " );
diff --git a/src/base/abc/abcMinBase.c b/src/base/abc/abcMinBase.c
index 22d1e285..fe3435ac 100644
--- a/src/base/abc/abcMinBase.c
+++ b/src/base/abc/abcMinBase.c
@@ -703,7 +703,7 @@ void Abc_ObjSortInReverseOrder( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes )
vOrder = Abc_NtkDfsReverse( pNtk );
Vec_PtrForEachEntry( Abc_Obj_t *, vOrder, pNode, i )
pNode->iTemp = i;
- Vec_PtrSort( vNodes, (int (*)())Abc_ObjCompareByNumber );
+ Vec_PtrSort( vNodes, (int (*)(const void *, const void *))Abc_ObjCompareByNumber );
Vec_PtrForEachEntry( Abc_Obj_t *, vOrder, pNode, i )
pNode->iTemp = 0;
Vec_PtrFree( vOrder );
diff --git a/src/base/abci/abcBalance.c b/src/base/abci/abcBalance.c
index 552cba7f..185ef9c1 100644
--- a/src/base/abci/abcBalance.c
+++ b/src/base/abci/abcBalance.c
@@ -266,7 +266,7 @@ Abc_Obj_t * Abc_NodeBalance_rec( Abc_Ntk_t * pNtkNew, Abc_Obj_t * pNodeOld, Vec_
if ( vSuper->nSize < 2 )
printf( "BUG!\n" );
// sort the new nodes by level in the decreasing order
- Vec_PtrSort( vSuper, (int (*)(void))Abc_NodeCompareLevelsDecrease );
+ Vec_PtrSort( vSuper, (int (*)(const void *, const void *))Abc_NodeCompareLevelsDecrease );
// balance the nodes
assert( vSuper->nSize > 1 );
while ( vSuper->nSize > 1 )
diff --git a/src/base/abci/abcDar.c b/src/base/abci/abcDar.c
index 95c9200d..483f65b9 100644
--- a/src/base/abci/abcDar.c
+++ b/src/base/abci/abcDar.c
@@ -91,7 +91,7 @@ void Abc_CollectTopOr( Abc_Obj_t * pObj, Vec_Ptr_t * vSuper )
if ( Abc_ObjIsComplement(pObj) )
{
Abc_CollectTopOr_rec( Abc_ObjNot(pObj), vSuper );
- Vec_PtrUniqify( vSuper, (int (*)())Abc_ObjCompareById );
+ Vec_PtrUniqify( vSuper, (int (*)(const void *, const void *))Abc_ObjCompareById );
}
else
Vec_PtrPush( vSuper, Abc_ObjNot(pObj) );
diff --git a/src/base/abci/abcLutmin.c b/src/base/abci/abcLutmin.c
index be01beb6..7bac74bf 100644
--- a/src/base/abci/abcLutmin.c
+++ b/src/base/abci/abcLutmin.c
@@ -610,7 +610,7 @@ Abc_Obj_t * Abc_NtkBddDecompose( Abc_Ntk_t * pNtkNew, Abc_Obj_t * pNode, int nLu
// cofactor w.r.t. the bound set variables
vCofs = Abc_NtkBddCofactors( dd, (DdNode *)pNode->pData, nLutSize );
vUniq = Vec_PtrDup( vCofs );
- Vec_PtrUniqify( vUniq, (int (*)())Vec_PtrSortCompare );
+ Vec_PtrUniqify( vUniq, (int (*)(const void *, const void *))Vec_PtrSortCompare );
// only perform decomposition with it is support reduring with two less vars
if( Vec_PtrSize(vUniq) > (1 << (nLutSize-2)) )
{
diff --git a/src/base/abci/abcMffc.c b/src/base/abci/abcMffc.c
index 1d64df5c..55f39252 100644
--- a/src/base/abci/abcMffc.c
+++ b/src/base/abci/abcMffc.c
@@ -1141,7 +1141,7 @@ Vec_Ptr_t * Abc_NktMffcServer( Abc_Ntk_t * pNtk, int nInMax, int nOutMax )
// sort by their MFFC size
Vec_PtrForEachEntry( Abc_Obj_t *, vPivots, pObj, i )
pObj->iTemp = Vec_IntSize((Vec_Int_t *)Vec_PtrEntry(vVolumes, Abc_ObjId(pObj)));
- Vec_PtrSort( vPivots, (int (*)(void))Abc_NodeCompareVolumeDecrease );
+ Vec_PtrSort( vPivots, (int (*)(const void *, const void *))Abc_NodeCompareVolumeDecrease );
// create marks
vMarks = Vec_IntStart( Abc_NtkObjNumMax(pNtk) );
Vec_PtrForEachEntry( Abc_Obj_t *, vPivots, pObj, i )
diff --git a/src/base/abci/abcNpnSave.c b/src/base/abci/abcNpnSave.c
index 0e2d13d5..3dd97432 100644
--- a/src/base/abci/abcNpnSave.c
+++ b/src/base/abci/abcNpnSave.c
@@ -564,7 +564,7 @@ void Npn_ManWrite( Npn_Man_t * p, char * pFileName )
for ( i = 0; i < p->nBins; i++ )
for ( pEntry = Npn_ManObj(p, p->pBins[i]); pEntry; pEntry = Npn_ManObj(p, pEntry->iNext) )
Vec_PtrPush( vEntries, pEntry );
- Vec_PtrSort( vEntries, (int (*)())Npn_ManCompareEntries );
+ Vec_PtrSort( vEntries, (int (*)(const void *, const void *))Npn_ManCompareEntries );
Vec_PtrForEachEntry( Npn_Obj_t *, vEntries, pEntry, i )
{
Extra_PrintHexadecimal( pFile, (unsigned *)&pEntry->uTruth, 6 );
diff --git a/src/base/abci/abcStrash.c b/src/base/abci/abcStrash.c
index 050f3647..d54957a6 100644
--- a/src/base/abci/abcStrash.c
+++ b/src/base/abci/abcStrash.c
@@ -712,7 +712,7 @@ Vec_Ptr_t * Abc_NodeGetSuper( Abc_Obj_t * pNode )
Vec_PtrFree( vSuper );
vSuper = vFront;
// uniquify and return the frontier
- Vec_PtrUniqify( vSuper, (int (*)())Vec_CompareNodeIds );
+ Vec_PtrUniqify( vSuper, (int (*)(const void *, const void *))Vec_CompareNodeIds );
return vSuper;
}
diff --git a/src/base/abci/abcSweep.c b/src/base/abci/abcSweep.c
index e970ac38..2f2f1ac1 100644
--- a/src/base/abci/abcSweep.c
+++ b/src/base/abci/abcSweep.c
@@ -888,7 +888,7 @@ int Abc_NtkReplaceAutonomousLogic( Abc_Ntk_t * pNtk )
Vec_PtrPush( vNodes, pFanin );
}
}
- Vec_PtrUniqify( vNodes, (int (*)(void))Abc_ObjPointerCompare );
+ Vec_PtrUniqify( vNodes, (int (*)(const void *, const void *))Abc_ObjPointerCompare );
// replace these nodes by the PIs
Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pNode, i )
{
diff --git a/src/base/cba/cbaNtk.c b/src/base/cba/cbaNtk.c
index 5be0aa6c..c3f8fae9 100644
--- a/src/base/cba/cbaNtk.c
+++ b/src/base/cba/cbaNtk.c
@@ -445,7 +445,7 @@ void Cba_NtkObjOrder( Cba_Ntk_t * p, Vec_Int_t * vObjs, Vec_Int_t * vNameIds )
// printf( "%s \n", pName );
// printf( "\n" );
// do the sorting
- Vec_PtrSort( vNames, (int (*)(void))Cba_StrCmp );
+ Vec_PtrSort( vNames, (int (*)(const void *, const void *))Cba_StrCmp );
// print after
// Vec_PtrForEachEntry( char *, vNames, pName, i )
// printf( "%s \n", pName );
diff --git a/src/base/wlc/wlcAbs.c b/src/base/wlc/wlcAbs.c
index 402ce21b..c297c54f 100644
--- a/src/base/wlc/wlcAbs.c
+++ b/src/base/wlc/wlcAbs.c
@@ -867,10 +867,10 @@ static Vec_Bit_t * Wlc_NtkMarkLimit( Wlc_Ntk_t * p, Wlc_Par_t * pPars )
}
}
- Vec_PtrSort( vAdds, (int (*)(void))IntPairPtrCompare ) ;
- Vec_PtrSort( vMults, (int (*)(void))IntPairPtrCompare ) ;
- Vec_PtrSort( vMuxes, (int (*)(void))IntPairPtrCompare ) ;
- Vec_PtrSort( vFlops, (int (*)(void))IntPairPtrCompare ) ;
+ Vec_PtrSort( vAdds, (int (*)(const void *, const void *))IntPairPtrCompare ) ;
+ Vec_PtrSort( vMults, (int (*)(const void *, const void *))IntPairPtrCompare ) ;
+ Vec_PtrSort( vMuxes, (int (*)(const void *, const void *))IntPairPtrCompare ) ;
+ Vec_PtrSort( vFlops, (int (*)(const void *, const void *))IntPairPtrCompare ) ;
Vec_PtrForEachEntry( Int_Pair_t *, vAdds, pPair, i )
{