summaryrefslogtreecommitdiffstats
path: root/src/map/super
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2019-03-05 15:57:50 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2019-03-05 15:57:50 -0800
commit01569b8f5f2394c534c3aba7276caf22493fce82 (patch)
tree40d52cf2d4d76c1e1e5bf6443c34836627f4e5f9 /src/map/super
parentb632c8496cc48bb8be0851ea2c183f94c201f791 (diff)
downloadabc-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/super')
-rw-r--r--src/map/super/superAnd.c2
-rw-r--r--src/map/super/superGate.c6
2 files changed, 4 insertions, 4 deletions
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 )