diff options
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/abc/abcFanOrder.c | 14 | ||||
-rw-r--r-- | src/base/abc/abcNames.c | 14 | ||||
-rw-r--r-- | src/base/abc/abcNtk.c | 2 | ||||
-rw-r--r-- | src/base/abc/abcSop.c | 2 | ||||
-rw-r--r-- | src/base/abc/abcUtil.c | 2 | ||||
-rw-r--r-- | src/base/abci/abcCollapse.c | 2 | ||||
-rw-r--r-- | src/base/abci/abcIf.c | 2 | ||||
-rw-r--r-- | src/base/abci/abcLut.c | 2 | ||||
-rw-r--r-- | src/base/abci/abcNpn.c | 2 | ||||
-rw-r--r-- | src/base/abci/abcRec3.c | 2 | ||||
-rw-r--r-- | src/base/acb/acbMfs.c | 2 | ||||
-rw-r--r-- | src/base/bac/bacBac.c | 4 | ||||
-rw-r--r-- | src/base/cmd/cmdUtils.c | 4 | ||||
-rw-r--r-- | src/base/exor/exorCubes.c | 2 | ||||
-rw-r--r-- | src/base/io/ioReadAiger.c | 2 | ||||
-rw-r--r-- | src/base/io/ioReadBlifMv.c | 2 | ||||
-rw-r--r-- | src/base/io/ioWritePla.c | 4 | ||||
-rw-r--r-- | src/base/ver/verStream.c | 2 |
18 files changed, 33 insertions, 33 deletions
diff --git a/src/base/abc/abcFanOrder.c b/src/base/abc/abcFanOrder.c index bfd99f38..8e2ed10d 100644 --- a/src/base/abc/abcFanOrder.c +++ b/src/base/abc/abcFanOrder.c @@ -66,7 +66,7 @@ void Abc_NtkOrderFaninsById( Abc_Ntk_t * pNtk ) Vec_IntSelectSortCost( pOrder, nVars, &pNode->vFanins ); // copy the cover Vec_StrGrow( vStore, Abc_SopGetCubeNum(pSop) * (nVars + 3) + 1 ); - memcpy( Vec_StrArray(vStore), pSop, Abc_SopGetCubeNum(pSop) * (nVars + 3) + 1 ); + memcpy( Vec_StrArray(vStore), pSop, (size_t)(Abc_SopGetCubeNum(pSop) * (nVars + 3) + 1) ); pSopNew = pCubeNew = pSop; pSop = Vec_StrArray(vStore); // generate permuted one @@ -168,7 +168,7 @@ void Abc_NtkOrderFaninsBySortingColumns( Abc_Ntk_t * pNtk ) pOrder = Vec_IntArray(vOrder); // copy the cover Vec_StrGrow( vStore, Abc_SopGetCubeNum(pSop) * (nVars + 3) + 1 ); - memcpy( Vec_StrArray(vStore), pSop, Abc_SopGetCubeNum(pSop) * (nVars + 3) + 1 ); + memcpy( Vec_StrArray(vStore), pSop, (size_t)(Abc_SopGetCubeNum(pSop) * (nVars + 3) + 1) ); pSopNew = pCubeNew = pSop; pSop = Vec_StrArray(vStore); // generate permuted one @@ -272,7 +272,7 @@ void Abc_NtkOrderFaninsByLitCount( Abc_Ntk_t * pNtk ) */ // copy the cover Vec_StrGrow( vStore, Abc_SopGetCubeNum(pSop) * (nVars + 3) + 1 ); - memcpy( Vec_StrArray(vStore), pSop, Abc_SopGetCubeNum(pSop) * (nVars + 3) + 1 ); + memcpy( Vec_StrArray(vStore), pSop, (size_t)(Abc_SopGetCubeNum(pSop) * (nVars + 3) + 1) ); pSopNew = pCubeNew = pSop; pSop = Vec_StrArray(vStore); // generate permuted one @@ -353,7 +353,7 @@ void Abc_NtkOrderFaninsByLitCountAndCubeCount( Abc_Ntk_t * pNtk ) Vec_IntSelectSortCost( pOrder, nVars, vCounts ); // copy the cover Vec_StrGrow( vStore, Abc_SopGetCubeNum(pSop) * (nVars + 3) + 1 ); - memcpy( Vec_StrArray(vStore), pSop, Abc_SopGetCubeNum(pSop) * (nVars + 3) + 1 ); + memcpy( Vec_StrArray(vStore), pSop, (size_t)(Abc_SopGetCubeNum(pSop) * (nVars + 3) + 1) ); pSopNew = pCubeNew = pSop; pSop = Vec_StrArray(vStore); // generate permuted one @@ -485,10 +485,10 @@ void Abc_NodeSortCubes( Abc_Obj_t * pNode, Vec_Ptr_t * vCubes, Vec_Str_t * vStor { assert( pCube[nVars] == 0 ); pCube[nVars] = ' '; - memcpy( pPivot, pCube, nVars + 3 ); + memcpy( pPivot, pCube, (size_t)(nVars + 3) ); pPivot += nVars + 3; } - memcpy( pSop, Vec_StrArray(vStore), Vec_PtrSize(vCubes) * (nVars + 3) ); + memcpy( pSop, Vec_StrArray(vStore), (size_t)(Vec_PtrSize(vCubes) * (nVars + 3)) ); } void Abc_NtkSortCubes( Abc_Ntk_t * pNtk, int fWeight ) { @@ -581,7 +581,7 @@ int Abc_NodeMakeSCCFree( Abc_Obj_t * pNode ) { if ( pCube[0] == 'z' ) continue; - memcpy( pSopNew, pCube, nVars + 3 ); + memcpy( pSopNew, pCube, (size_t)(nVars + 3) ); pSopNew += nVars + 3; } *pSopNew = 0; diff --git a/src/base/abc/abcNames.c b/src/base/abc/abcNames.c index b32093e9..fe9b3dca 100644 --- a/src/base/abc/abcNames.c +++ b/src/base/abc/abcNames.c @@ -334,13 +334,13 @@ void Abc_NtkOrderObjsByName( Abc_Ntk_t * pNtk, int fComb ) Abc_NtkForEachBox( pNtk, pObj, i ) pObj->pCopy = (Abc_Obj_t *)Abc_ObjName(Abc_ObjFanout0(pObj)); // order objects alphabetically - qsort( (void *)Vec_PtrArray(pNtk->vPis), Vec_PtrSize(pNtk->vPis), sizeof(Abc_Obj_t *), + qsort( (void *)Vec_PtrArray(pNtk->vPis), (size_t)Vec_PtrSize(pNtk->vPis), sizeof(Abc_Obj_t *), (int (*)(const void *, const void *)) Abc_NodeCompareNames ); - qsort( (void *)Vec_PtrArray(pNtk->vPos), Vec_PtrSize(pNtk->vPos), sizeof(Abc_Obj_t *), + qsort( (void *)Vec_PtrArray(pNtk->vPos), (size_t)Vec_PtrSize(pNtk->vPos), sizeof(Abc_Obj_t *), (int (*)(const void *, const void *)) Abc_NodeCompareNames ); // if the comparison if combinational (latches as PIs/POs), order them too if ( fComb ) - qsort( (void *)Vec_PtrArray(pNtk->vBoxes), Vec_PtrSize(pNtk->vBoxes), sizeof(Abc_Obj_t *), + qsort( (void *)Vec_PtrArray(pNtk->vBoxes), (size_t)Vec_PtrSize(pNtk->vBoxes), sizeof(Abc_Obj_t *), (int (*)(const void *, const void *)) Abc_NodeCompareNames ); // order CIs/COs first PIs/POs(Asserts) then latches Abc_NtkOrderCisCos( pNtk ); @@ -428,14 +428,14 @@ void Abc_NtkTransferOrder( Abc_Ntk_t * pNtkOld, Abc_Ntk_t * pNtkNew ) Abc_NamDeref( pStrsCi ); Abc_NamDeref( pStrsCo ); // order PI/PO - qsort( (void *)Vec_PtrArray(pNtkNew->vPis), Vec_PtrSize(pNtkNew->vPis), sizeof(Abc_Obj_t *), + qsort( (void *)Vec_PtrArray(pNtkNew->vPis), (size_t)Vec_PtrSize(pNtkNew->vPis), sizeof(Abc_Obj_t *), (int (*)(const void *, const void *)) Abc_NodeCompareIndexes ); - qsort( (void *)Vec_PtrArray(pNtkNew->vPos), Vec_PtrSize(pNtkNew->vPos), sizeof(Abc_Obj_t *), + qsort( (void *)Vec_PtrArray(pNtkNew->vPos), (size_t)Vec_PtrSize(pNtkNew->vPos), sizeof(Abc_Obj_t *), (int (*)(const void *, const void *)) Abc_NodeCompareIndexes ); // order CI/CO - qsort( (void *)Vec_PtrArray(pNtkNew->vCis), Vec_PtrSize(pNtkNew->vCis), sizeof(Abc_Obj_t *), + qsort( (void *)Vec_PtrArray(pNtkNew->vCis), (size_t)Vec_PtrSize(pNtkNew->vCis), sizeof(Abc_Obj_t *), (int (*)(const void *, const void *)) Abc_NodeCompareIndexes ); - qsort( (void *)Vec_PtrArray(pNtkNew->vCos), Vec_PtrSize(pNtkNew->vCos), sizeof(Abc_Obj_t *), + qsort( (void *)Vec_PtrArray(pNtkNew->vCos), (size_t)Vec_PtrSize(pNtkNew->vCos), sizeof(Abc_Obj_t *), (int (*)(const void *, const void *)) Abc_NodeCompareIndexes ); // order CIs/COs first PIs/POs(Asserts) then latches //Abc_NtkOrderCisCos( pNtk ); diff --git a/src/base/abc/abcNtk.c b/src/base/abc/abcNtk.c index a62542b9..8e10ab3b 100644 --- a/src/base/abc/abcNtk.c +++ b/src/base/abc/abcNtk.c @@ -2091,7 +2091,7 @@ int Abc_NodeCompareByFanoutCount( Abc_Obj_t ** pp1, Abc_Obj_t ** pp2 ) void Abc_NtkPermutePiUsingFanout( Abc_Ntk_t * pNtk ) { Abc_Obj_t * pNode; int i; - qsort( (void *)Vec_PtrArray(pNtk->vPis), Vec_PtrSize(pNtk->vPis), sizeof(Abc_Obj_t *), + qsort( (void *)Vec_PtrArray(pNtk->vPis), (size_t)Vec_PtrSize(pNtk->vPis), sizeof(Abc_Obj_t *), (int (*)(const void *, const void *)) Abc_NodeCompareByFanoutCount ); Vec_PtrClear( pNtk->vCis ); Vec_PtrForEachEntry( Abc_Obj_t *, pNtk->vPis, pNode, i ) diff --git a/src/base/abc/abcSop.c b/src/base/abc/abcSop.c index af758970..b0ce2ab7 100644 --- a/src/base/abc/abcSop.c +++ b/src/base/abc/abcSop.c @@ -81,7 +81,7 @@ char * Abc_SopStart( Mem_Flex_t * pMan, int nCubes, int nVars ) Length = nCubes * (nVars + 3); pSopCover = Mem_FlexEntryFetch( pMan, Length + 1 ); - memset( pSopCover, '-', Length ); + memset( pSopCover, '-', (size_t)Length ); pSopCover[Length] = 0; for ( i = 0; i < nCubes; i++ ) diff --git a/src/base/abc/abcUtil.c b/src/base/abc/abcUtil.c index a63abb9e..038079e8 100644 --- a/src/base/abc/abcUtil.c +++ b/src/base/abc/abcUtil.c @@ -2139,7 +2139,7 @@ void Abc_NtkCompareCones( Abc_Ntk_t * pNtk ) pSupps[i] = Vec_PtrSize(vSupp); Vec_PtrFree( vSupp ); } - qsort( (void *)pPerms, Abc_NtkCoNum(pNtk), sizeof(int), (int (*)(const void *, const void *)) Abc_NtkCompareConesCompare ); + qsort( (void *)pPerms, (size_t)Abc_NtkCoNum(pNtk), sizeof(int), (int (*)(const void *, const void *)) Abc_NtkCompareConesCompare ); // consider COs in this order Iter = 0; diff --git a/src/base/abci/abcCollapse.c b/src/base/abci/abcCollapse.c index caeea3a1..ca54d542 100644 --- a/src/base/abci/abcCollapse.c +++ b/src/base/abci/abcCollapse.c @@ -375,7 +375,7 @@ Vec_Ptr_t * Abc_NtkCreateCoOrder( Abc_Ntk_t * pNtk, Vec_Wec_t * vSupps ) Vec_PtrPush( vNodes, pNode ); } // order objects alphabetically - qsort( (void *)Vec_PtrArray(vNodes), Vec_PtrSize(vNodes), sizeof(Abc_Obj_t *), + qsort( (void *)Vec_PtrArray(vNodes), (size_t)Vec_PtrSize(vNodes), sizeof(Abc_Obj_t *), (int (*)(const void *, const void *)) Abc_NodeCompareByTemp ); // cleanup // Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pNode, i ) diff --git a/src/base/abci/abcIf.c b/src/base/abci/abcIf.c index 08e2a560..ab88c5e2 100644 --- a/src/base/abci/abcIf.c +++ b/src/base/abci/abcIf.c @@ -755,7 +755,7 @@ Vec_Ptr_t * Abc_NtkFindGoodOrder( Abc_Ntk_t * pNtk ) } // sort nodes in the increasing order of the flow - qsort( (Abc_Obj_t **)Vec_PtrArray(vCos), Abc_NtkCoNum(pNtk), + qsort( (Abc_Obj_t **)Vec_PtrArray(vCos), (size_t)Abc_NtkCoNum(pNtk), sizeof(Abc_Obj_t *), (int (*)(const void *, const void *))Abc_ObjCompareFlow ); // verify sorting pFanin0 = (Abc_Obj_t *)Vec_PtrEntry(vCos, 0); diff --git a/src/base/abci/abcLut.c b/src/base/abci/abcLut.c index 66db8e97..edc2b7de 100644 --- a/src/base/abci/abcLut.c +++ b/src/base/abci/abcLut.c @@ -678,7 +678,7 @@ int Abc_NodeDecomposeStep( Abc_ManScl_t * p ) /* for ( v = 0; v < nVars; v++ ) p->pBSet[v] = v; - qsort( (void *)p->pBSet, nVars, sizeof(int), + qsort( (void *)p->pBSet, (size_t)nVars, sizeof(int), (int (*)(const void *, const void *)) Abc_NodeCompareLevelsInc ); */ Abc_NodeDecomposeSort( (Abc_Obj_t **)Vec_PtrArray(p->vLeaves), Vec_PtrSize(p->vLeaves), p->pBSet, p->nLutSize ); diff --git a/src/base/abci/abcNpn.c b/src/base/abci/abcNpn.c index 744b6443..4f8019b1 100644 --- a/src/base/abci/abcNpn.c +++ b/src/base/abci/abcNpn.c @@ -132,7 +132,7 @@ int Abc_TruthNpnCountUniqueSort( Abc_TtStore_t * p ) // sort them by value nWords = p->nWords; assert( nWords > 0 ); - qsort( (void *)p->pFuncs, p->nFuncs, sizeof(word *), (int(*)(const void *,const void *))Abc_TruthCompare ); + qsort( (void *)p->pFuncs, (size_t)p->nFuncs, sizeof(word *), (int(*)(const void *,const void *))Abc_TruthCompare ); // count the number of unqiue functions for ( i = k = 1; i < p->nFuncs; i++ ) if ( memcmp( p->pFuncs[i-1], p->pFuncs[i], sizeof(word) * nWords ) ) diff --git a/src/base/abci/abcRec3.c b/src/base/abci/abcRec3.c index 3e5f29af..a17ecc2e 100644 --- a/src/base/abci/abcRec3.c +++ b/src/base/abci/abcRec3.c @@ -1356,7 +1356,7 @@ void Abc_NtkRecDumpTt3( char * pFileName, int fBinary ) Vec_MemForEachEntry( p->vTtMem, pTruth, i ) Vec_StrPush( p->vSupps, (char)Abc_TtSupportSize(pTruth, nVars) ); vEntries = Vec_IntStartNatural( nEntries ); - qsort( (void *)Vec_IntArray(vEntries), nEntries, sizeof(int), (int(*)(const void *,const void *))Abc_NtkRecTruthCompare ); + qsort( (void *)Vec_IntArray(vEntries), (size_t)nEntries, sizeof(int), (int(*)(const void *,const void *))Abc_NtkRecTruthCompare ); Vec_StrFreeP( &p->vSupps ); // write the file Vec_IntForEachEntry( vEntries, Entry, i ) diff --git a/src/base/acb/acbMfs.c b/src/base/acb/acbMfs.c index 9fce00f8..e89545a4 100644 --- a/src/base/acb/acbMfs.c +++ b/src/base/acb/acbMfs.c @@ -98,7 +98,7 @@ void Acb_DeriveCnfForWindowOne( Acb_Ntk_t * p, int iObj ) assert( Vec_WecSize(vCnfs) == Acb_NtkObjNumMax(p) ); Acb_DeriveCnfFromTruth( Acb_ObjTruth(p, iObj), Acb_ObjFaninNum(p, iObj), &p->vCover, &p->vCnf ); Vec_StrGrow( vCnfBase, Vec_StrSize(&p->vCnf) ); - memcpy( Vec_StrArray(vCnfBase), Vec_StrArray(&p->vCnf), Vec_StrSize(&p->vCnf) ); + memcpy( Vec_StrArray(vCnfBase), Vec_StrArray(&p->vCnf), (size_t)Vec_StrSize(&p->vCnf) ); vCnfBase->nSize = Vec_StrSize(&p->vCnf); } Vec_Wec_t * Acb_DeriveCnfForWindow( Acb_Ntk_t * p, Vec_Int_t * vWin, int PivotVar ) diff --git a/src/base/bac/bacBac.c b/src/base/bac/bacBac.c index 4f2971a5..94c52fdb 100644 --- a/src/base/bac/bacBac.c +++ b/src/base/bac/bacBac.c @@ -87,14 +87,14 @@ int BacManReadBacNameAndNums( char * pBuffer, int * Num1, int * Num2, int * Num3 } void Bac_ManReadBacVecStr( Vec_Str_t * vOut, int * pPos, Vec_Str_t * p, int nSize ) { - memcpy( Vec_StrArray(p), Vec_StrArray(vOut) + *pPos, nSize ); + memcpy( Vec_StrArray(p), Vec_StrArray(vOut) + *pPos, (size_t)nSize ); *pPos += nSize; p->nSize = nSize; assert( Vec_StrSize(p) == Vec_StrCap(p) ); } void Bac_ManReadBacVecInt( Vec_Str_t * vOut, int * pPos, Vec_Int_t * p, int nSize ) { - memcpy( Vec_IntArray(p), Vec_StrArray(vOut) + *pPos, nSize ); + memcpy( Vec_IntArray(p), Vec_StrArray(vOut) + *pPos, (size_t)nSize ); *pPos += nSize; p->nSize = nSize / 4; assert( Vec_IntSize(p) == Vec_IntCap(p) ); diff --git a/src/base/cmd/cmdUtils.c b/src/base/cmd/cmdUtils.c index 3d4d91bb..3409543f 100644 --- a/src/base/cmd/cmdUtils.c +++ b/src/base/cmd/cmdUtils.c @@ -576,7 +576,7 @@ void CmdCommandPrint( Abc_Frame_t * pAbc, int fPrintAll, int fDetails ) nCommands = i; // sort command by group and then by name, alphabetically - qsort( (void *)ppCommands, nCommands, sizeof(Abc_Command *), + qsort( (void *)ppCommands, (size_t)nCommands, sizeof(Abc_Command *), (int (*)(const void *, const void *)) CmdCommandPrintCompare ); assert( CmdCommandPrintCompare( ppCommands, ppCommands + nCommands - 1 ) <= 0 ); @@ -734,7 +734,7 @@ void CmdPrintTable( st__table * tTable, int fAliases ) ppNames[nNames++] = key; // sort array by name - qsort( (void *)ppNames, nNames, sizeof(char *), + qsort( (void *)ppNames, (size_t)nNames, sizeof(char *), (int (*)(const void *, const void *))CmdNamePrintCompare ); // print in this order diff --git a/src/base/exor/exorCubes.c b/src/base/exor/exorCubes.c index c8b40a82..197099d5 100644 --- a/src/base/exor/exorCubes.c +++ b/src/base/exor/exorCubes.c @@ -113,7 +113,7 @@ int AllocateCover( int nCubes, int nWordsIn, int nWordsOut ) pp[0] = (Cube *)ABC_ALLOC( char, TotalSize ); if ( pp[0] == NULL ) return 0; - memset( pp[0], 0, TotalSize ); + memset( pp[0], 0, (size_t)TotalSize ); // assign pointers to cubes and bit strings inside this piece pp[0]->pCubeDataIn = (unsigned*)(pp[0] + 1); diff --git a/src/base/io/ioReadAiger.c b/src/base/io/ioReadAiger.c index 1d9ca877..f87d971f 100644 --- a/src/base/io/ioReadAiger.c +++ b/src/base/io/ioReadAiger.c @@ -153,7 +153,7 @@ static char * Ioa_ReadLoadFileBz2Aig( char * pFileName, int * pFileSize ) p = pContents = ABC_ALLOC( char, nFileSize + 10 ); buf = bufHead; do { - memcpy(p+nBytes,buf->buf,buf->nBuf); + memcpy(p+nBytes,buf->buf,(size_t)buf->nBuf); nBytes += buf->nBuf; // } while((buf = buf->next)); pNext = buf->next; diff --git a/src/base/io/ioReadBlifMv.c b/src/base/io/ioReadBlifMv.c index d78f567a..df7a67af 100644 --- a/src/base/io/ioReadBlifMv.c +++ b/src/base/io/ioReadBlifMv.c @@ -585,7 +585,7 @@ char * Io_MvLoadFileBz2( char * pFileName, int * pnFileSize ) p = pContents = ABC_ALLOC( char, nFileSize + 10 ); buf = bufHead; do { - memcpy(p+nBytes,buf->buf,buf->nBuf); + memcpy(p+nBytes,buf->buf,(size_t)buf->nBuf); nBytes += buf->nBuf; // } while((buf = buf->next)); pNext = buf->next; diff --git a/src/base/io/ioWritePla.c b/src/base/io/ioWritePla.c index 8aa9ee19..aa6a933d 100644 --- a/src/base/io/ioWritePla.c +++ b/src/base/io/ioWritePla.c @@ -76,8 +76,8 @@ int Io_WritePlaOne( FILE * pFile, Abc_Ntk_t * pNtk ) nOutputs = Abc_NtkCoNum(pNtk); pCubeIn = ABC_ALLOC( char, nInputs + 1 ); pCubeOut = ABC_ALLOC( char, nOutputs + 1 ); - memset( pCubeIn, '-', nInputs ); pCubeIn[nInputs] = 0; - memset( pCubeOut, '0', nOutputs ); pCubeOut[nOutputs] = 0; + memset( pCubeIn, '-', (size_t)nInputs ); pCubeIn[nInputs] = 0; + memset( pCubeOut, '0', (size_t)nOutputs ); pCubeOut[nOutputs] = 0; // write the header fprintf( pFile, ".i %d\n", nInputs ); diff --git a/src/base/ver/verStream.c b/src/base/ver/verStream.c index 59706311..b1051a77 100644 --- a/src/base/ver/verStream.c +++ b/src/base/ver/verStream.c @@ -131,7 +131,7 @@ void Ver_StreamReload( Ver_Stream_t * p ) // figure out how many chars are still not processed nCharsUsed = p->pBufferEnd - p->pBufferCur; // move the remaining data to the beginning of the buffer - memmove( p->pBuffer, p->pBufferCur, nCharsUsed ); + memmove( p->pBuffer, p->pBufferCur, (size_t)nCharsUsed ); p->pBufferCur = p->pBuffer; // determine how many chars we will read nCharsToRead = VER_MINIMUM( p->nBufferSize - nCharsUsed, p->nFileSize - p->nFileRead ); |