summaryrefslogtreecommitdiffstats
path: root/src/opt
diff options
context:
space:
mode:
Diffstat (limited to 'src/opt')
-rw-r--r--src/opt/cut/cutCut.c2
-rw-r--r--src/opt/dau/dauCanon.c2
-rw-r--r--src/opt/dau/dauDsd.c2
-rw-r--r--src/opt/dau/dauDsd2.c8
-rw-r--r--src/opt/dau/dauTree.c2
-rw-r--r--src/opt/fxu/fxuCreate.c2
-rw-r--r--src/opt/fxu/fxuUpdate.c2
-rw-r--r--src/opt/res/resSim.c2
-rw-r--r--src/opt/rwr/rwrEva.c2
-rw-r--r--src/opt/rwr/rwrTemp.c2
-rw-r--r--src/opt/sfm/sfmCnf.c2
-rw-r--r--src/opt/sfm/sfmLib.c2
12 files changed, 15 insertions, 15 deletions
diff --git a/src/opt/cut/cutCut.c b/src/opt/cut/cutCut.c
index bd0a70b1..4f9089d9 100644
--- a/src/opt/cut/cutCut.c
+++ b/src/opt/cut/cutCut.c
@@ -126,7 +126,7 @@ Cut_Cut_t * Cut_CutDupList( Cut_Man_t * p, Cut_Cut_t * pList )
Cut_ListForEachCut( pList, pTemp )
{
pCopy = (Cut_Cut_t *)Extra_MmFixedEntryFetch( p->pMmCuts );
- memcpy( pCopy, pTemp, p->EntrySize );
+ memcpy( pCopy, pTemp, (size_t)p->EntrySize );
*ppTail = pCopy;
ppTail = &pCopy->pNext;
}
diff --git a/src/opt/dau/dauCanon.c b/src/opt/dau/dauCanon.c
index ce0d1857..739dd373 100644
--- a/src/opt/dau/dauCanon.c
+++ b/src/opt/dau/dauCanon.c
@@ -1456,7 +1456,7 @@ unsigned Abc_TtCanonicizeWrap(TtCanonicizeFunc func, Abc_TtHieMan_t * p, word *
if (Abc_TtCompareRev(pTruth, pTruth2, nWords) <= 0)
return uCanonPhase1;
Abc_TtCopy(pTruth, pTruth2, nWords, 0);
- memcpy(pCanonPerm, pCanonPerm2, nVars);
+ memcpy(pCanonPerm, pCanonPerm2, (size_t)nVars);
return uCanonPhase2;
}
diff --git a/src/opt/dau/dauDsd.c b/src/opt/dau/dauDsd.c
index 8469da4b..b1e7e0d8 100644
--- a/src/opt/dau/dauDsd.c
+++ b/src/opt/dau/dauDsd.c
@@ -237,7 +237,7 @@ void Dau_DsdNormalize_rec( char * pStr, char ** p, int * pMatches )
for ( i = 0; i < nMarks; i++ )
pStore = Dau_DsdNormalizeCopy( pStore, pStr, pMarks, pPerm[i] );
assert( pStore - pBuffer == *p - pOld );
- memcpy( pOld, pBuffer, pStore - pBuffer );
+ memcpy( pOld, pBuffer, (size_t)(pStore - pBuffer) );
return;
}
if ( **p == '<' || **p == '{' ) // mux
diff --git a/src/opt/dau/dauDsd2.c b/src/opt/dau/dauDsd2.c
index cf7dea0b..69c91a09 100644
--- a/src/opt/dau/dauDsd2.c
+++ b/src/opt/dau/dauDsd2.c
@@ -524,9 +524,9 @@ word Dua_DsdRangeVars( word * pTruth, int nVars, int iVar, int jVar, int fPerfor
pCof0 = pCof1 = NULL;
for ( Mint = 0; Mint < nMints; Mint++, iWord += nWordsF )
{
- if ( !pCof0 || !memcmp(pCof0, pTruth + iWord, nBytes) )
+ if ( !pCof0 || !memcmp(pCof0, pTruth + iWord, (size_t)nBytes) )
pCof0 = pTruth + iWord;
- else if ( !pCof1 || !memcmp(pCof1, pTruth + iWord, nBytes) )
+ else if ( !pCof1 || !memcmp(pCof1, pTruth + iWord, (size_t)nBytes) )
{
pCof1 = pTruth + iWord;
MaskOne |= ((word)1) << Mint;
@@ -541,8 +541,8 @@ word Dua_DsdRangeVars( word * pTruth, int nVars, int iVar, int jVar, int fPerfor
if ( fPerform )
{
assert( pCof0 && pCof1 );
- memcpy( pTruth + (2 * Part + 0) * nWordsF, pCof0, nBytes );
- memcpy( pTruth + (2 * Part + 1) * nWordsF, pCof1, nBytes );
+ memcpy( pTruth + (2 * Part + 0) * nWordsF, pCof0, (size_t)nBytes );
+ memcpy( pTruth + (2 * Part + 1) * nWordsF, pCof1, (size_t)nBytes );
}
}
}
diff --git a/src/opt/dau/dauTree.c b/src/opt/dau/dauTree.c
index f8508d53..81bd51bc 100644
--- a/src/opt/dau/dauTree.c
+++ b/src/opt/dau/dauTree.c
@@ -860,7 +860,7 @@ unsigned * Dss_ObjHashLookup( Dss_Man_t * p, int Type, Vec_Int_t * vFaninLits, w
if ( (int)pObj->Type == Type &&
(int)pObj->nFans == Vec_IntSize(vFaninLits) &&
!memcmp(pObj->pFans, Vec_IntArray(vFaninLits), sizeof(int)*pObj->nFans) &&
- (pTruth == NULL || !memcmp(Dss_ObjTruth(pObj), pTruth, Abc_TtByteNum(pObj->nFans))) ) // equal
+ (pTruth == NULL || !memcmp(Dss_ObjTruth(pObj), pTruth, (size_t)Abc_TtByteNum(pObj->nFans))) ) // equal
return pSpot;
}
return pSpot;
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 );
}
diff --git a/src/opt/res/resSim.c b/src/opt/res/resSim.c
index d4088e7b..2d77d9af 100644
--- a/src/opt/res/resSim.c
+++ b/src/opt/res/resSim.c
@@ -314,7 +314,7 @@ void Res_SimSetDerivedBytes( Res_Sim_t * p, int fUseWalk )
if ( i == p->nTruePis )
break;
pInfo = (unsigned char *)Vec_PtrEntry( p->vPats, pObj->Id );
- memset( pInfo + nPats, 0, p->nBytesIn - nPats );
+ memset( pInfo + nPats, 0, (size_t)(p->nBytesIn - nPats) );
}
}
/*
diff --git a/src/opt/rwr/rwrEva.c b/src/opt/rwr/rwrEva.c
index 463e9bd7..1856f7b7 100644
--- a/src/opt/rwr/rwrEva.c
+++ b/src/opt/rwr/rwrEva.c
@@ -566,7 +566,7 @@ void Rwr_ScoresReport( Rwr_Man_t * p )
Gains[i] += pNode->nGain;
}
// sort the gains
- qsort( Perm, 222, sizeof(int), (int (*)(const void *, const void *))Rwr_ScoresCompare );
+ qsort( Perm, (size_t)222, sizeof(int), (int (*)(const void *, const void *))Rwr_ScoresCompare );
// print classes
for ( i = 0; i < p->vClasses->nSize; i++ )
diff --git a/src/opt/rwr/rwrTemp.c b/src/opt/rwr/rwrTemp.c
index b32709e5..4eb652d7 100644
--- a/src/opt/rwr/rwrTemp.c
+++ b/src/opt/rwr/rwrTemp.c
@@ -89,7 +89,7 @@ void Rwr_Temp()
for ( i = 0; i < 13719; i++ )
pPerm[i] = i;
- qsort( (void *)pPerm, 13719, sizeof(int),
+ qsort( (void *)pPerm, (size_t)13719, sizeof(int),
(int (*)(const void *, const void *)) Rwr_TempCompare );
diff --git a/src/opt/sfm/sfmCnf.c b/src/opt/sfm/sfmCnf.c
index b4dd11f8..ce2f34b8 100644
--- a/src/opt/sfm/sfmCnf.c
+++ b/src/opt/sfm/sfmCnf.c
@@ -132,7 +132,7 @@ Vec_Wec_t * Sfm_CreateCnf( Sfm_Ntk_t * p )
nCubes = Sfm_TruthToCnf( uTruth, Sfm_ObjFaninNum(p, i), p->vCover, vCnf );
vCnfBase = (Vec_Str_t *)Vec_WecEntry( vCnfs, i );
Vec_StrGrow( vCnfBase, Vec_StrSize(vCnf) );
- memcpy( Vec_StrArray(vCnfBase), Vec_StrArray(vCnf), Vec_StrSize(vCnf) );
+ memcpy( Vec_StrArray(vCnfBase), Vec_StrArray(vCnf), (size_t)Vec_StrSize(vCnf) );
vCnfBase->nSize = Vec_StrSize(vCnf);
}
Vec_StrFree( vCnf );
diff --git a/src/opt/sfm/sfmLib.c b/src/opt/sfm/sfmLib.c
index e9a3b322..afb4a48d 100644
--- a/src/opt/sfm/sfmLib.c
+++ b/src/opt/sfm/sfmLib.c
@@ -110,7 +110,7 @@ void Sfm_DecCreateCnf( Vec_Int_t * vGateSizes, Vec_Wrd_t * vGateFuncs, Vec_Wec_t
nCubes = Sfm_TruthToCnf( uTruth, Vec_IntEntry(vGateSizes, i), vCover, vCnf );
vCnfBase = (Vec_Str_t *)Vec_WecEntry( vGateCnfs, i );
Vec_StrGrow( vCnfBase, Vec_StrSize(vCnf) );
- memcpy( Vec_StrArray(vCnfBase), Vec_StrArray(vCnf), Vec_StrSize(vCnf) );
+ memcpy( Vec_StrArray(vCnfBase), Vec_StrArray(vCnf), (size_t)Vec_StrSize(vCnf) );
vCnfBase->nSize = Vec_StrSize(vCnf);
}
Vec_IntFree( vCover );