summaryrefslogtreecommitdiffstats
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/amap/amapLib.c2
-rw-r--r--src/map/amap/amapMatch.c2
-rw-r--r--src/map/amap/amapRule.c2
-rw-r--r--src/map/fpga/fpgaCut.c2
-rw-r--r--src/map/fpga/fpgaUtils.c4
-rw-r--r--src/map/fpga/fpgaVec.c4
-rw-r--r--src/map/if/if.h4
-rw-r--r--src/map/if/ifDsd.c2
-rw-r--r--src/map/mapper/mapperCut.c2
-rw-r--r--src/map/mapper/mapperTable.c4
-rw-r--r--src/map/mapper/mapperUtils.c2
-rw-r--r--src/map/mapper/mapperVec.c2
-rw-r--r--src/map/mio/mioRead.c2
-rw-r--r--src/map/mio/mioUtils.c8
-rw-r--r--src/map/scl/sclLibUtil.c2
-rw-r--r--src/map/super/superAnd.c2
-rw-r--r--src/map/super/superGate.c6
17 files changed, 26 insertions, 26 deletions
diff --git a/src/map/amap/amapLib.c b/src/map/amap/amapLib.c
index 26ef639f..ca8404e1 100644
--- a/src/map/amap/amapLib.c
+++ b/src/map/amap/amapLib.c
@@ -221,7 +221,7 @@ Vec_Ptr_t * Amap_LibSortGatesByArea( Amap_Lib_t * pLib )
{
Vec_Ptr_t * vSorted;
vSorted = Vec_PtrDup( pLib->vGates );
- qsort( (void *)Vec_PtrArray(vSorted), Vec_PtrSize(vSorted), sizeof(void *),
+ qsort( (void *)Vec_PtrArray(vSorted), (size_t)Vec_PtrSize(vSorted), sizeof(void *),
(int (*)(const void *, const void *)) Amap_LibCompareGatesByArea );
return vSorted;
}
diff --git a/src/map/amap/amapMatch.c b/src/map/amap/amapMatch.c
index 85e03056..2276cfc2 100644
--- a/src/map/amap/amapMatch.c
+++ b/src/map/amap/amapMatch.c
@@ -47,7 +47,7 @@ Amap_Cut_t * Amap_ManDupCut( Amap_Man_t * p, Amap_Cut_t * pCut )
Amap_Cut_t * pNew;
int nBytes = sizeof(Amap_Cut_t) + sizeof(int) * pCut->nFans;
pNew = (Amap_Cut_t *)Aig_MmFlexEntryFetch( p->pMemCutBest, nBytes );
- memcpy( pNew, pCut, nBytes );
+ memcpy( pNew, pCut, (size_t)nBytes );
return pNew;
}
diff --git a/src/map/amap/amapRule.c b/src/map/amap/amapRule.c
index 94c5bb9f..e906dd9e 100644
--- a/src/map/amap/amapRule.c
+++ b/src/map/amap/amapRule.c
@@ -396,7 +396,7 @@ if ( pLib->fVerbose )
pSet2->iGate = pGate->Id;
pSet2->fInv = Abc_LitIsCompl(iNod);
pSet2->nIns = pGate->nPins;
- memcpy( pSet2->Ins, pSet->Ins, pGate->nPins );
+ memcpy( pSet2->Ins, pSet->Ins, (size_t)pGate->nPins );
// update inputs
pSet2->Ins[iThis] = Abc_Var2Lit( Abc_Lit2Var(pSet->Ins[iThat]), Abc_LitIsCompl(pSet->Ins[iThis]) );
pSet2->Ins[iThat] = Abc_Var2Lit( Abc_Lit2Var(pSet->Ins[iThis]), Abc_LitIsCompl(pSet->Ins[iThat]) );
diff --git a/src/map/fpga/fpgaCut.c b/src/map/fpga/fpgaCut.c
index 75007888..09edcae9 100644
--- a/src/map/fpga/fpgaCut.c
+++ b/src/map/fpga/fpgaCut.c
@@ -1112,7 +1112,7 @@ Fpga_Cut_t * Fpga_CutSortCuts( Fpga_Man_t * pMan, Fpga_CutTable_t * p, Fpga_Cut_
nCuts = Fpga_CutList2Array( p->pCuts1, pList );
assert( nCuts <= FPGA_CUTS_MAX_COMPUTE );
// sort the cuts
- qsort( (void *)p->pCuts1, nCuts, sizeof(void *),
+ qsort( (void *)p->pCuts1, (size_t)nCuts, sizeof(void *),
(int (*)(const void *, const void *)) Fpga_CutSortCutsCompare );
// move them back into the list
if ( nCuts > FPGA_CUTS_MAX_USE - 1 )
diff --git a/src/map/fpga/fpgaUtils.c b/src/map/fpga/fpgaUtils.c
index f10971ad..aa34bc04 100644
--- a/src/map/fpga/fpgaUtils.c
+++ b/src/map/fpga/fpgaUtils.c
@@ -584,10 +584,10 @@ int Fpga_CompareNodesByLevelIncreasing( Fpga_Node_t ** ppS1, Fpga_Node_t ** ppS2
void Fpga_MappingSortByLevel( Fpga_Man_t * pMan, Fpga_NodeVec_t * vNodes, int fIncreasing )
{
if ( fIncreasing )
- qsort( (void *)vNodes->pArray, vNodes->nSize, sizeof(Fpga_Node_t *),
+ qsort( (void *)vNodes->pArray, (size_t)vNodes->nSize, sizeof(Fpga_Node_t *),
(int (*)(const void *, const void *)) Fpga_CompareNodesByLevelIncreasing );
else
- qsort( (void *)vNodes->pArray, vNodes->nSize, sizeof(Fpga_Node_t *),
+ qsort( (void *)vNodes->pArray, (size_t)vNodes->nSize, sizeof(Fpga_Node_t *),
(int (*)(const void *, const void *)) Fpga_CompareNodesByLevelDecreasing );
// assert( Fpga_CompareNodesByLevel( vNodes->pArray, vNodes->pArray + vNodes->nSize - 1 ) <= 0 );
}
diff --git a/src/map/fpga/fpgaVec.c b/src/map/fpga/fpgaVec.c
index 35260029..e7948365 100644
--- a/src/map/fpga/fpgaVec.c
+++ b/src/map/fpga/fpgaVec.c
@@ -288,7 +288,7 @@ int Fpga_NodeVecCompareLevels( Fpga_Node_t ** pp1, Fpga_Node_t ** pp2 )
***********************************************************************/
void Fpga_NodeVecSortByLevel( Fpga_NodeVec_t * p )
{
- qsort( (void *)p->pArray, p->nSize, sizeof(Fpga_Node_t *),
+ qsort( (void *)p->pArray, (size_t)p->nSize, sizeof(Fpga_Node_t *),
(int (*)(const void *, const void *)) Fpga_NodeVecCompareLevels );
}
@@ -325,7 +325,7 @@ int Fpga_NodeVecCompareArrivals( Fpga_Node_t ** ppS1, Fpga_Node_t ** ppS2 )
***********************************************************************/
void Fpga_SortNodesByArrivalTimes( Fpga_NodeVec_t * p )
{
- qsort( (void *)p->pArray, p->nSize, sizeof(Fpga_Node_t *),
+ qsort( (void *)p->pArray, (size_t)p->nSize, sizeof(Fpga_Node_t *),
(int (*)(const void *, const void *)) Fpga_NodeVecCompareArrivals );
// assert( Fpga_CompareNodesByLevel( p->pArray, p->pArray + p->nSize - 1 ) <= 0 );
}
diff --git a/src/map/if/if.h b/src/map/if/if.h
index 6ae8b30b..669b3c24 100644
--- a/src/map/if/if.h
+++ b/src/map/if/if.h
@@ -411,8 +411,8 @@ static inline int If_CutTruthWords( int nVarsMax ) { r
static inline int If_CutPermWords( int nVarsMax ) { return nVarsMax / sizeof(int) + ((nVarsMax % sizeof(int)) > 0); }
static inline int If_CutLeafBit( If_Cut_t * pCut, int i ) { return (pCut->uMaskFunc >> i) & 1; }
static inline char * If_CutPerm( If_Cut_t * pCut ) { return (char *)(pCut->pLeaves + pCut->nLeaves); }
-static inline void If_CutCopy( If_Man_t * p, If_Cut_t * pDst, If_Cut_t * pSrc ) { memcpy( pDst, pSrc, p->nCutBytes ); }
-static inline void If_CutSetup( If_Man_t * p, If_Cut_t * pCut ) { memset(pCut, 0, p->nCutBytes); pCut->nLimit = p->pPars->nLutSize; }
+static inline void If_CutCopy( If_Man_t * p, If_Cut_t * pDst, If_Cut_t * pSrc ) { memcpy( pDst, pSrc, (size_t)p->nCutBytes ); }
+static inline void If_CutSetup( If_Man_t * p, If_Cut_t * pCut ) { memset(pCut, 0, (size_t)p->nCutBytes); pCut->nLimit = p->pPars->nLutSize; }
static inline If_Cut_t * If_ObjCutBest( If_Obj_t * pObj ) { return &pObj->CutBest; }
static inline unsigned If_ObjCutSign( unsigned ObjId ) { return (1 << (ObjId % 31)); }
diff --git a/src/map/if/ifDsd.c b/src/map/if/ifDsd.c
index 2094a5d9..802e6892 100644
--- a/src/map/if/ifDsd.c
+++ b/src/map/if/ifDsd.c
@@ -2074,7 +2074,7 @@ int If_DsdManCompute( If_DsdMan_t * p, word * pTruth, int nLeaves, unsigned char
//p->timeDsd += Abc_Clock() - clk;
if ( nSizeNonDec > 0 )
Abc_TtStretch6( pCopy, nSizeNonDec, p->nVars );
- memset( pPerm, 0xFF, nLeaves );
+ memset( pPerm, 0xFF, (size_t)nLeaves );
//clk = Abc_Clock();
iDsd = If_DsdManAddDsd( p, pDsd, pCopy, pPerm, &nSupp );
//p->timeCanon += Abc_Clock() - clk;
diff --git a/src/map/mapper/mapperCut.c b/src/map/mapper/mapperCut.c
index 681625ac..cbb061f2 100644
--- a/src/map/mapper/mapperCut.c
+++ b/src/map/mapper/mapperCut.c
@@ -1007,7 +1007,7 @@ Map_Cut_t * Map_CutSortCuts( Map_Man_t * pMan, Map_CutTable_t * p, Map_Cut_t * p
assert( nCuts <= MAP_CUTS_MAX_COMPUTE );
// sort the cuts
//clk = Abc_Clock();
- qsort( (void *)p->pCuts1, nCuts, sizeof(Map_Cut_t *),
+ qsort( (void *)p->pCuts1, (size_t)nCuts, sizeof(Map_Cut_t *),
(int (*)(const void *, const void *)) Map_CutSortCutsCompare );
//pMan->time2 += Abc_Clock() - clk;
// move them back into the list
diff --git a/src/map/mapper/mapperTable.c b/src/map/mapper/mapperTable.c
index 7e12d8dc..b7dff4dd 100644
--- a/src/map/mapper/mapperTable.c
+++ b/src/map/mapper/mapperTable.c
@@ -328,7 +328,7 @@ void Map_SuperTableSortSupergates( Map_HashTable_t * p, int nSupersMax )
ppSupers[nSupers++] = pSuper;
// sort by usage
- qsort( (void *)ppSupers, nSupers, sizeof(Map_Super_t *),
+ qsort( (void *)ppSupers, (size_t)nSupers, sizeof(Map_Super_t *),
(int (*)(const void *, const void *)) Map_SuperTableCompareSupergates );
assert( Map_SuperTableCompareSupergates( ppSupers, ppSupers + nSupers - 1 ) <= 0 );
@@ -383,7 +383,7 @@ void Map_SuperTableSortSupergatesByDelay( Map_HashTable_t * p, int nSupersMax )
if ( nSupers == 0 )
continue;
// sort the gates by delay
- qsort( (void *)ppSupers, nSupers, sizeof(Map_Super_t *),
+ qsort( (void *)ppSupers, (size_t)nSupers, sizeof(Map_Super_t *),
(int (*)(const void *, const void *)) Map_SuperTableCompareGatesInList );
assert( Map_SuperTableCompareGatesInList( ppSupers, ppSupers + nSupers - 1 ) <= 0 );
// link them in the reverse order
diff --git a/src/map/mapper/mapperUtils.c b/src/map/mapper/mapperUtils.c
index 7ea60ec9..ea6ab065 100644
--- a/src/map/mapper/mapperUtils.c
+++ b/src/map/mapper/mapperUtils.c
@@ -543,7 +543,7 @@ int Map_CompareNodesByLevel( Map_Node_t ** ppS1, Map_Node_t ** ppS2 )
***********************************************************************/
void Map_MappingSortByLevel( Map_Man_t * pMan, Map_NodeVec_t * vNodes )
{
- qsort( (void *)vNodes->pArray, vNodes->nSize, sizeof(Map_Node_t *),
+ qsort( (void *)vNodes->pArray, (size_t)vNodes->nSize, sizeof(Map_Node_t *),
(int (*)(const void *, const void *)) Map_CompareNodesByLevel );
// assert( Map_CompareNodesByLevel( vNodes->pArray, vNodes->pArray + vNodes->nSize - 1 ) <= 0 );
}
diff --git a/src/map/mapper/mapperVec.c b/src/map/mapper/mapperVec.c
index 8316072a..d2cd2bc0 100644
--- a/src/map/mapper/mapperVec.c
+++ b/src/map/mapper/mapperVec.c
@@ -306,7 +306,7 @@ Map_Node_t * Map_NodeVecReadEntry( Map_NodeVec_t * p, int i )
***********************************************************************/
void Map_NodeVecSortByLevel( Map_NodeVec_t * p )
{
- qsort( (void *)p->pArray, p->nSize, sizeof(Map_Node_t *),
+ qsort( (void *)p->pArray, (size_t)p->nSize, sizeof(Map_Node_t *),
(int (*)(const void *, const void *)) Map_NodeVecCompareLevels );
}
diff --git a/src/map/mio/mioRead.c b/src/map/mio/mioRead.c
index d23f77f0..c0a83cfd 100644
--- a/src/map/mio/mioRead.c
+++ b/src/map/mio/mioRead.c
@@ -595,7 +595,7 @@ void Mio_LibrarySortGates( Mio_Library_t * pLib )
pLib->ppGates0 = ABC_ALLOC( Mio_Gate_t *, pLib->nGates );
for ( i = 0; i < pLib->nGates; i++ )
pLib->ppGates0[i] = ppGates[i];
- qsort( (void *)ppGates, pLib->nGates, sizeof(void *),
+ qsort( (void *)ppGates, (size_t)pLib->nGates, sizeof(void *),
(int (*)(const void *, const void *)) Mio_LibraryCompareGatesByName );
for ( i = 0; i < pLib->nGates; i++ )
ppGates[i]->pNext = (i < pLib->nGates-1)? ppGates[i+1] : NULL;
diff --git a/src/map/mio/mioUtils.c b/src/map/mio/mioUtils.c
index b2ee8ab9..9cd44cba 100644
--- a/src/map/mio/mioUtils.c
+++ b/src/map/mio/mioUtils.c
@@ -462,7 +462,7 @@ Mio_Gate_t ** Mio_CollectRoots( Mio_Library_t * pLib, int nInputs, float tDelay,
// sort by delay
if ( iGate > 0 )
{
- qsort( (void *)ppGates, iGate, sizeof(Mio_Gate_t *),
+ qsort( (void *)ppGates, (size_t)iGate, sizeof(Mio_Gate_t *),
(int (*)(const void *, const void *)) Mio_DelayCompare );
assert( Mio_DelayCompare( ppGates, ppGates + iGate - 1 ) <= 0 );
}
@@ -572,7 +572,7 @@ Mio_Cell_t * Mio_CollectRootsNew( Mio_Library_t * pLib, int nInputs, int * pnGat
// sort by delay
if ( iCell > 5 )
{
- qsort( (void *)(ppCells + 4), iCell - 4, sizeof(Mio_Cell_t),
+ qsort( (void *)(ppCells + 4), (size_t)(iCell - 4), sizeof(Mio_Cell_t),
(int (*)(const void *, const void *)) Mio_AreaCompare );
assert( Mio_AreaCompare( ppCells + 4, ppCells + iCell - 1 ) <= 0 );
}
@@ -729,7 +729,7 @@ Mio_Cell2_t * Mio_CollectRootsNew2( Mio_Library_t * pLib, int nInputs, int * pnG
// sort by delay
if ( iCell > 5 )
{
- qsort( (void *)(ppCells + 4), iCell - 4, sizeof(Mio_Cell2_t),
+ qsort( (void *)(ppCells + 4), (size_t)(iCell - 4), sizeof(Mio_Cell2_t),
(int (*)(const void *, const void *)) Mio_AreaCompare2 );
assert( Mio_AreaCompare2( ppCells + 4, ppCells + iCell - 1 ) <= 0 );
}
@@ -818,7 +818,7 @@ int Mio_CollectRootsNewDefault3( int nInputs, Vec_Ptr_t ** pvNames, Vec_Wrd_t **
pTruth[1] = pTruth[3] = pGate0->pTruth[1];
}
else if ( pGate0->nInputs == 8 )
- memcpy( pTruth, pGate0->pTruth, 4*sizeof(word) );
+ memcpy( pTruth, pGate0->pTruth, (size_t)(4*sizeof(word)) );
}
assert( iGate == nGates );
assert( Vec_WrdEntry(*pvTruths, 0) == 0 );
diff --git a/src/map/scl/sclLibUtil.c b/src/map/scl/sclLibUtil.c
index ebd9cbc7..f57669b7 100644
--- a/src/map/scl/sclLibUtil.c
+++ b/src/map/scl/sclLibUtil.c
@@ -292,7 +292,7 @@ void Abc_SclLinkCells( SC_Lib * p )
Vec_PtrClear( vList );
SC_RingForEachCell( pRepr, pCell, i )
Vec_PtrPush( vList, pCell );
- qsort( (void *)Vec_PtrArray(vList), Vec_PtrSize(vList), sizeof(void *), (int(*)(const void *,const void *))Abc_SclCompareCells );
+ qsort( (void *)Vec_PtrArray(vList), (size_t)Vec_PtrSize(vList), sizeof(void *), (int(*)(const void *,const void *))Abc_SclCompareCells );
// create new representative
pRepr = (SC_Cell *)Vec_PtrEntry( vList, 0 );
pRepr->pNext = pRepr->pPrev = pRepr;
diff --git a/src/map/super/superAnd.c b/src/map/super/superAnd.c
index 3e55d0f5..9b0ffca1 100644
--- a/src/map/super/superAnd.c
+++ b/src/map/super/superAnd.c
@@ -475,7 +475,7 @@ clk = Abc_Clock();
// sort the supergates by truth table
s_uMaskBit = pLib->uMaskBit;
s_uMaskAll = SUPER_MASK(pLib->nMints);
- qsort( (void *)pLib->pGates, pLib->nGates, sizeof(Super2_Gate_t *),
+ qsort( (void *)pLib->pGates, (size_t)pLib->nGates, sizeof(Super2_Gate_t *),
(int (*)(const void *, const void *)) Super2_LibCompareGates );
assert( Super2_LibCompareGates( pLib->pGates, pLib->pGates + pLib->nGates - 1 ) < 0 );
ABC_PRT( "Sorting", Abc_Clock() - clk );
diff --git a/src/map/super/superGate.c b/src/map/super/superGate.c
index c96c9526..82c928a7 100644
--- a/src/map/super/superGate.c
+++ b/src/map/super/superGate.c
@@ -368,7 +368,7 @@ Super_Man_t * Super_Compute( Super_Man_t * pMan, Mio_Gate_t ** ppGates, int nGat
printf( "Sorting array of %d supergates...\r", pMan->nGates );
fflush( stdout );
}
- qsort( (void *)pMan->pGates, pMan->nGates, sizeof(Super_Gate_t *),
+ qsort( (void *)pMan->pGates, (size_t)pMan->nGates, sizeof(Super_Gate_t *),
(int (*)(const void *, const void *)) Super_DelayCompare );
assert( Super_DelayCompare( pMan->pGates, pMan->pGates + pMan->nGates - 1 ) <= 0 );
if ( pMan->nGates > 10000 )
@@ -424,7 +424,7 @@ Super_Man_t * Super_Compute( Super_Man_t * pMan, Mio_Gate_t ** ppGates, int nGat
// all the gates beyond this point can be skipped because their area can be only larger
if ( nGatesLimit > 10000 )
printf( "Sorting array of %d supergates...\r", nGatesLimit );
- qsort( (void *)ppGatesLimit, nGatesLimit, sizeof(Super_Gate_t *),
+ qsort( (void *)ppGatesLimit, (size_t)nGatesLimit, sizeof(Super_Gate_t *),
(int (*)(const void *, const void *)) Super_AreaCompare );
assert( Super_AreaCompare( ppGatesLimit, ppGatesLimit + nGatesLimit - 1 ) <= 0 );
if ( nGatesLimit > 10000 )
@@ -1021,7 +1021,7 @@ Vec_Str_t * Super_Write( Super_Man_t * pMan )
clk = Abc_Clock();
// sort the supergates by truth table
- qsort( (void *)pMan->pGates, pMan->nGates, sizeof(Super_Gate_t *),
+ qsort( (void *)pMan->pGates, (size_t)pMan->nGates, sizeof(Super_Gate_t *),
(int (*)(const void *, const void *)) Super_WriteCompare );
assert( Super_WriteCompare( pMan->pGates, pMan->pGates + pMan->nGates - 1 ) <= 0 );
if ( pMan->fVerbose )