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/if | |
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/if')
-rw-r--r-- | src/map/if/if.h | 4 | ||||
-rw-r--r-- | src/map/if/ifDsd.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/map/if/if.h b/src/map/if/if.h index 6ae8b30b..669b3c24 100644 --- a/src/map/if/if.h +++ b/src/map/if/if.h @@ -411,8 +411,8 @@ static inline int If_CutTruthWords( int nVarsMax ) { r static inline int If_CutPermWords( int nVarsMax ) { return nVarsMax / sizeof(int) + ((nVarsMax % sizeof(int)) > 0); } static inline int If_CutLeafBit( If_Cut_t * pCut, int i ) { return (pCut->uMaskFunc >> i) & 1; } static inline char * If_CutPerm( If_Cut_t * pCut ) { return (char *)(pCut->pLeaves + pCut->nLeaves); } -static inline void If_CutCopy( If_Man_t * p, If_Cut_t * pDst, If_Cut_t * pSrc ) { memcpy( pDst, pSrc, p->nCutBytes ); } -static inline void If_CutSetup( If_Man_t * p, If_Cut_t * pCut ) { memset(pCut, 0, p->nCutBytes); pCut->nLimit = p->pPars->nLutSize; } +static inline void If_CutCopy( If_Man_t * p, If_Cut_t * pDst, If_Cut_t * pSrc ) { memcpy( pDst, pSrc, (size_t)p->nCutBytes ); } +static inline void If_CutSetup( If_Man_t * p, If_Cut_t * pCut ) { memset(pCut, 0, (size_t)p->nCutBytes); pCut->nLimit = p->pPars->nLutSize; } static inline If_Cut_t * If_ObjCutBest( If_Obj_t * pObj ) { return &pObj->CutBest; } static inline unsigned If_ObjCutSign( unsigned ObjId ) { return (1 << (ObjId % 31)); } diff --git a/src/map/if/ifDsd.c b/src/map/if/ifDsd.c index 2094a5d9..802e6892 100644 --- a/src/map/if/ifDsd.c +++ b/src/map/if/ifDsd.c @@ -2074,7 +2074,7 @@ int If_DsdManCompute( If_DsdMan_t * p, word * pTruth, int nLeaves, unsigned char //p->timeDsd += Abc_Clock() - clk; if ( nSizeNonDec > 0 ) Abc_TtStretch6( pCopy, nSizeNonDec, p->nVars ); - memset( pPerm, 0xFF, nLeaves ); + memset( pPerm, 0xFF, (size_t)nLeaves ); //clk = Abc_Clock(); iDsd = If_DsdManAddDsd( p, pDsd, pCopy, pPerm, &nSupp ); //p->timeCanon += Abc_Clock() - clk; |