summaryrefslogtreecommitdiffstats
path: root/src/aig/gia/giaAiger.c
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/aig/gia/giaAiger.c
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/aig/gia/giaAiger.c')
-rw-r--r--src/aig/gia/giaAiger.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/aig/gia/giaAiger.c b/src/aig/gia/giaAiger.c
index 47986faa..6cf3e2e7 100644
--- a/src/aig/gia/giaAiger.c
+++ b/src/aig/gia/giaAiger.c
@@ -525,7 +525,7 @@ Gia_Man_t * Gia_AigerReadFromMemory( char * pContents, int nFileSize, int fGiaSi
{
pCur++;
vStr = Vec_StrStart( Gia_AigerReadInt(pCur) ); pCur += 4;
- memcpy( Vec_StrArray(vStr), pCur, Vec_StrSize(vStr) );
+ memcpy( Vec_StrArray(vStr), pCur, (size_t)Vec_StrSize(vStr) );
pCur += Vec_StrSize(vStr);
pNew->pAigExtra = Gia_AigerReadFromMemory( Vec_StrArray(vStr), Vec_StrSize(vStr), 0, 0, 0 );
Vec_StrFree( vStr );
@@ -552,7 +552,7 @@ Gia_Man_t * Gia_AigerReadFromMemory( char * pContents, int nFileSize, int fGiaSi
pCur++;
nInputs = Gia_AigerReadInt(pCur)/4; pCur += 4;
pNew->vInArrs = Vec_FltStart( nInputs );
- memcpy( Vec_FltArray(pNew->vInArrs), pCur, 4*nInputs ); pCur += 4*nInputs;
+ memcpy( Vec_FltArray(pNew->vInArrs), pCur, (size_t)4*nInputs ); pCur += 4*nInputs;
if ( fVerbose ) printf( "Finished reading extension \"i\".\n" );
}
else if ( *pCur == 'o' )
@@ -560,7 +560,7 @@ Gia_Man_t * Gia_AigerReadFromMemory( char * pContents, int nFileSize, int fGiaSi
pCur++;
nOutputs = Gia_AigerReadInt(pCur)/4; pCur += 4;
pNew->vOutReqs = Vec_FltStart( nOutputs );
- memcpy( Vec_FltArray(pNew->vOutReqs), pCur, 4*nOutputs ); pCur += 4*nOutputs;
+ memcpy( Vec_FltArray(pNew->vOutReqs), pCur, (size_t)4*nOutputs ); pCur += 4*nOutputs;
if ( fVerbose ) printf( "Finished reading extension \"o\".\n" );
}
// read equivalence classes
@@ -580,7 +580,7 @@ Gia_Man_t * Gia_AigerReadFromMemory( char * pContents, int nFileSize, int fGiaSi
pCur++;
assert( Gia_AigerReadInt(pCur) == 4*Gia_ManRegNum(pNew) ); pCur += 4;
pNew->vFlopClasses = Vec_IntStart( Gia_ManRegNum(pNew) );
- memcpy( Vec_IntArray(pNew->vFlopClasses), pCur, 4*Gia_ManRegNum(pNew) ); pCur += 4*Gia_ManRegNum(pNew);
+ memcpy( Vec_IntArray(pNew->vFlopClasses), pCur, (size_t)4*Gia_ManRegNum(pNew) ); pCur += 4*Gia_ManRegNum(pNew);
if ( fVerbose ) printf( "Finished reading extension \"f\".\n" );
}
// read gate classes
@@ -589,7 +589,7 @@ Gia_Man_t * Gia_AigerReadFromMemory( char * pContents, int nFileSize, int fGiaSi
pCur++;
assert( Gia_AigerReadInt(pCur) == 4*Gia_ManObjNum(pNew) ); pCur += 4;
pNew->vGateClasses = Vec_IntStart( Gia_ManObjNum(pNew) );
- memcpy( Vec_IntArray(pNew->vGateClasses), pCur, 4*Gia_ManObjNum(pNew) ); pCur += 4*Gia_ManObjNum(pNew);
+ memcpy( Vec_IntArray(pNew->vGateClasses), pCur, (size_t)4*Gia_ManObjNum(pNew) ); pCur += 4*Gia_ManObjNum(pNew);
if ( fVerbose ) printf( "Finished reading extension \"g\".\n" );
}
// read hierarchy information
@@ -597,7 +597,7 @@ Gia_Man_t * Gia_AigerReadFromMemory( char * pContents, int nFileSize, int fGiaSi
{
pCur++;
vStr = Vec_StrStart( Gia_AigerReadInt(pCur) ); pCur += 4;
- memcpy( Vec_StrArray(vStr), pCur, Vec_StrSize(vStr) );
+ memcpy( Vec_StrArray(vStr), pCur, (size_t)Vec_StrSize(vStr) );
pCur += Vec_StrSize(vStr);
pNew->pManTime = Tim_ManLoad( vStr, 1 );
Vec_StrFree( vStr );
@@ -653,7 +653,7 @@ Gia_Man_t * Gia_AigerReadFromMemory( char * pContents, int nFileSize, int fGiaSi
pCur++;
pCurTemp = pCur + Gia_AigerReadInt(pCur) + 4; pCur += 4;
pPlacement = ABC_ALLOC( Gia_Plc_t, Gia_ManObjNum(pNew) );
- memcpy( pPlacement, pCur, 4*Gia_ManObjNum(pNew) ); pCur += 4*Gia_ManObjNum(pNew);
+ memcpy( pPlacement, pCur, (size_t)4*Gia_ManObjNum(pNew) ); pCur += 4*Gia_ManObjNum(pNew);
assert( pCur == pCurTemp );
pNew->pPlacement = pPlacement;
if ( fVerbose ) printf( "Finished reading extension \"p\".\n" );
@@ -696,7 +696,7 @@ Gia_Man_t * Gia_AigerReadFromMemory( char * pContents, int nFileSize, int fGiaSi
nSize = nSize - strlen(pNew->pCellStr) - 1;
assert( nSize % 4 == 0 );
pNew->vConfigs = Vec_IntAlloc(nSize / 4);
-// memcpy(Vec_IntArray(pNew->vConfigs), pCur, nSize); pCur += nSize;
+// memcpy(Vec_IntArray(pNew->vConfigs), pCur, (size_t)nSize); pCur += nSize;
for ( i = 0; i < nSize / 4; i++ )
Vec_IntPush( pNew->vConfigs, Gia_AigerReadInt(pCur) ), pCur += 4;
assert( pCur == pCurTemp );
@@ -728,7 +728,7 @@ Gia_Man_t * Gia_AigerReadFromMemory( char * pContents, int nFileSize, int fGiaSi
pCur++;
pCurTemp = pCur + Gia_AigerReadInt(pCur) + 4; pCur += 4;
pSwitching = ABC_ALLOC( unsigned char, Gia_ManObjNum(pNew) );
- memcpy( pSwitching, pCur, Gia_ManObjNum(pNew) ); pCur += Gia_ManObjNum(pNew);
+ memcpy( pSwitching, pCur, (size_t)Gia_ManObjNum(pNew) ); pCur += Gia_ManObjNum(pNew);
assert( pCur == pCurTemp );
if ( fVerbose ) printf( "Finished reading extension \"s\".\n" );
}
@@ -737,7 +737,7 @@ Gia_Man_t * Gia_AigerReadFromMemory( char * pContents, int nFileSize, int fGiaSi
{
pCur++;
vStr = Vec_StrStart( Gia_AigerReadInt(pCur) ); pCur += 4;
- memcpy( Vec_StrArray(vStr), pCur, Vec_StrSize(vStr) ); pCur += Vec_StrSize(vStr);
+ memcpy( Vec_StrArray(vStr), pCur, (size_t)Vec_StrSize(vStr) ); pCur += Vec_StrSize(vStr);
pNew->pManTime = Tim_ManLoad( vStr, 0 );
Vec_StrFree( vStr );
if ( fVerbose ) printf( "Finished reading extension \"t\".\n" );
@@ -747,7 +747,7 @@ Gia_Man_t * Gia_AigerReadFromMemory( char * pContents, int nFileSize, int fGiaSi
{
pCur++;
pNew->vObjClasses = Vec_IntStart( Gia_AigerReadInt(pCur)/4 ); pCur += 4;
- memcpy( Vec_IntArray(pNew->vObjClasses), pCur, 4*Vec_IntSize(pNew->vObjClasses) );
+ memcpy( Vec_IntArray(pNew->vObjClasses), pCur, (size_t)4*Vec_IntSize(pNew->vObjClasses) );
pCur += 4*Vec_IntSize(pNew->vObjClasses);
if ( fVerbose ) printf( "Finished reading extension \"v\".\n" );
}