summaryrefslogtreecommitdiffstats
path: root/src/opt/fxu
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/opt/fxu
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/opt/fxu')
-rw-r--r--src/opt/fxu/fxuCreate.c2
-rw-r--r--src/opt/fxu/fxuUpdate.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/opt/fxu/fxuCreate.c b/src/opt/fxu/fxuCreate.c
index 31228dfd..8d5b2f54 100644
--- a/src/opt/fxu/fxuCreate.c
+++ b/src/opt/fxu/fxuCreate.c
@@ -152,7 +152,7 @@ Fxu_Matrix * Fxu_CreateMatrix( Fxu_Data_t * pData )
for ( v = 0; v < nFanins; v++ )
pOrder[v] = v;
// reorder the fanins
- qsort( (void *)pOrder, nFanins, sizeof(int),(int (*)(const void *, const void *))Fxu_CreateMatrixLitCompare);
+ qsort( (void *)pOrder, (size_t)nFanins, sizeof(int),(int (*)(const void *, const void *))Fxu_CreateMatrixLitCompare);
assert( s_pLits[ pOrder[0] ] < s_pLits[ pOrder[nFanins-1] ] );
// create the corresponding cubes in the matrix
pCubeFirst = NULL;
diff --git a/src/opt/fxu/fxuUpdate.c b/src/opt/fxu/fxuUpdate.c
index b48961e1..511ac955 100644
--- a/src/opt/fxu/fxuUpdate.c
+++ b/src/opt/fxu/fxuUpdate.c
@@ -588,7 +588,7 @@ void Fxu_UpdatePairsSort( Fxu_Matrix * p, Fxu_Double * pDouble )
if ( p->vPairs->nSize < 2 )
return;
// sort
- qsort( (void *)p->vPairs->pArray, p->vPairs->nSize, sizeof(Fxu_Pair *),
+ qsort( (void *)p->vPairs->pArray, (size_t)p->vPairs->nSize, sizeof(Fxu_Pair *),
(int (*)(const void *, const void *)) Fxu_UpdatePairCompare );
assert( Fxu_UpdatePairCompare( (Fxu_Pair**)p->vPairs->pArray, (Fxu_Pair**)p->vPairs->pArray + p->vPairs->nSize - 1 ) < 0 );
}