summaryrefslogtreecommitdiffstats
path: root/src/opt/dau
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/dau
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/dau')
-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
4 files changed, 7 insertions, 7 deletions
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;