diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2019-03-05 15:57:50 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2019-03-05 15:57:50 -0800 |
commit | 01569b8f5f2394c534c3aba7276caf22493fce82 (patch) | |
tree | 40d52cf2d4d76c1e1e5bf6443c34836627f4e5f9 /src/map/mapper | |
parent | b632c8496cc48bb8be0851ea2c183f94c201f791 (diff) | |
download | abc-01569b8f5f2394c534c3aba7276caf22493fce82.tar.gz abc-01569b8f5f2394c534c3aba7276caf22493fce82.tar.bz2 abc-01569b8f5f2394c534c3aba7276caf22493fce82.zip |
Fixing some warnings by adding cast from 'int' to 'size_t' in memset, memcpy, etc.
Diffstat (limited to 'src/map/mapper')
-rw-r--r-- | src/map/mapper/mapperCut.c | 2 | ||||
-rw-r--r-- | src/map/mapper/mapperTable.c | 4 | ||||
-rw-r--r-- | src/map/mapper/mapperUtils.c | 2 | ||||
-rw-r--r-- | src/map/mapper/mapperVec.c | 2 |
4 files changed, 5 insertions, 5 deletions
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 ); } |