From ba64e78608064612db61d6515f19dd2cabe69cee Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sun, 26 Sep 2021 11:30:54 -0700 Subject: Changing declaration of Vec_Ptr_t sorting function to satisfy some compilers. --- src/opt/cgt/cgtAig.c | 2 +- src/opt/dar/darBalance.c | 6 +++--- src/opt/mfs/mfsDiv.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/opt') diff --git a/src/opt/cgt/cgtAig.c b/src/opt/cgt/cgtAig.c index 9421b75e..2a3b342c 100644 --- a/src/opt/cgt/cgtAig.c +++ b/src/opt/cgt/cgtAig.c @@ -133,7 +133,7 @@ void Cgt_ManDetectFanout( Aig_Man_t * pAig, Aig_Obj_t * pObj, int nOdcMax, Vec_P Vec_PtrWriteEntry( vFanout, k++, pObj ); } Vec_PtrShrink( vFanout, k ); - Vec_PtrSort( vFanout, (int (*)(void))Aig_ObjCompareIdIncrease ); + Vec_PtrSort( vFanout, (int (*)(const void *, const void *))Aig_ObjCompareIdIncrease ); assert( Vec_PtrSize(vFanout) > 0 ); } diff --git a/src/opt/dar/darBalance.c b/src/opt/dar/darBalance.c index 871a6bb3..d8195762 100644 --- a/src/opt/dar/darBalance.c +++ b/src/opt/dar/darBalance.c @@ -59,7 +59,7 @@ void Dar_BalanceUniqify( Aig_Obj_t * pObj, Vec_Ptr_t * vNodes, int fExor ) Aig_Obj_t * pTemp, * pTempNext; int i, k; // sort the nodes by their literal - Vec_PtrSort( vNodes, (int (*)())Dar_ObjCompareLits ); + Vec_PtrSort( vNodes, (int (*)(const void *, const void *))Dar_ObjCompareLits ); // remove duplicates k = 0; Vec_PtrForEachEntry( Aig_Obj_t *, vNodes, pTemp, i ) @@ -402,7 +402,7 @@ Aig_Obj_t * Dar_BalanceBuildSuper( Aig_Man_t * p, Vec_Ptr_t * vSuper, Aig_Type_t int LeftBound; assert( vSuper->nSize > 1 ); // sort the new nodes by level in the decreasing order - Vec_PtrSort( vSuper, (int (*)(void))Aig_NodeCompareLevelsDecrease ); + Vec_PtrSort( vSuper, (int (*)(const void *, const void *))Aig_NodeCompareLevelsDecrease ); // balance the nodes while ( vSuper->nSize > 1 ) { @@ -462,7 +462,7 @@ Aig_Obj_t * Dar_BalanceBuildSuperTop( Aig_Man_t * p, Vec_Ptr_t * vSuper, Aig_Typ int i, nBaseSizeAll, nBaseSize; assert( vSuper->nSize > 1 ); // sort the new nodes by level in the decreasing order - Vec_PtrSort( vSuper, (int (*)(void))Aig_NodeCompareLevelsDecrease ); + Vec_PtrSort( vSuper, (int (*)(const void *, const void *))Aig_NodeCompareLevelsDecrease ); // add one LUT at a time while ( Vec_PtrSize(vSuper) > 1 ) { diff --git a/src/opt/mfs/mfsDiv.c b/src/opt/mfs/mfsDiv.c index ece8ec64..535e8d23 100644 --- a/src/opt/mfs/mfsDiv.c +++ b/src/opt/mfs/mfsDiv.c @@ -282,7 +282,7 @@ Vec_Ptr_t * Abc_MfsComputeDivisors( Mfs_Man_t * p, Abc_Obj_t * pNode, int nLevDi p->nMaxDivs += (Vec_PtrSize(vDivs) >= p->pPars->nWinMax); // sort the divisors by level in the increasing order - Vec_PtrSort( vDivs, (int (*)(void))Abc_NodeCompareLevelsIncrease ); + Vec_PtrSort( vDivs, (int (*)(const void *, const void *))Abc_NodeCompareLevelsIncrease ); // add the fanins of the node Abc_ObjForEachFanin( pNode, pFanin, k ) -- cgit v1.2.3