summaryrefslogtreecommitdiffstats
path: root/src/bool
diff options
context:
space:
mode:
Diffstat (limited to 'src/bool')
-rw-r--r--src/bool/kit/kitDsd.c2
-rw-r--r--src/bool/kit/kitPla.c2
-rw-r--r--src/bool/lucky/lucky.c58
-rw-r--r--src/bool/lucky/luckyFast16.c16
-rw-r--r--src/bool/lucky/luckySwap.c12
-rw-r--r--src/bool/lucky/luckySwapIJ.c6
6 files changed, 48 insertions, 48 deletions
diff --git a/src/bool/kit/kitDsd.c b/src/bool/kit/kitDsd.c
index 07c16f12..7d85214b 100644
--- a/src/bool/kit/kitDsd.c
+++ b/src/bool/kit/kitDsd.c
@@ -95,7 +95,7 @@ Kit_DsdObj_t * Kit_DsdObjAlloc( Kit_DsdNtk_t * pNtk, Kit_Dsd_t Type, int nFans )
Kit_DsdObj_t * pObj;
int nSize = sizeof(Kit_DsdObj_t) + sizeof(unsigned) * (Kit_DsdObjOffset(nFans) + (Type == KIT_DSD_PRIME) * Kit_TruthWordNum(nFans));
pObj = (Kit_DsdObj_t *)ABC_ALLOC( char, nSize );
- memset( pObj, 0, nSize );
+ memset( pObj, 0, (size_t)nSize );
pObj->Id = pNtk->nVars + pNtk->nNodes;
pObj->Type = Type;
pObj->nFans = nFans;
diff --git a/src/bool/kit/kitPla.c b/src/bool/kit/kitPla.c
index 9ae2b2c0..a9c7f573 100644
--- a/src/bool/kit/kitPla.c
+++ b/src/bool/kit/kitPla.c
@@ -216,7 +216,7 @@ char * Kit_PlaStart( void * p, int nCubes, int nVars )
Length = nCubes * (nVars + 3);
pSopCover = Aig_MmFlexEntryFetch( pMan, Length + 1 );
- memset( pSopCover, '-', Length );
+ memset( pSopCover, '-', (size_t)Length );
pSopCover[Length] = 0;
for ( i = 0; i < nCubes; i++ )
diff --git a/src/bool/lucky/lucky.c b/src/bool/lucky/lucky.c
index 7db08b9a..c70f4145 100644
--- a/src/bool/lucky/lucky.c
+++ b/src/bool/lucky/lucky.c
@@ -47,7 +47,7 @@ int memCompare(word* x, word* y, int nVars)
{
int i, count=1, WordsN = p->nFuncs;
word tempWord;
- qsort(a,WordsN,sizeof(word),compareWords1);
+ qsort(a,(size_t)WordsN,sizeof(word),compareWords1);
tempWord = a[0];
for(i=1;i<WordsN;i++)
if(tempWord != a[i])
@@ -302,25 +302,25 @@ int minimalFlip1(word* pInOut, word* pMinimal, word* PDuplicat, int nVars)
{
int i;
int blockSize = Kit_TruthWordNum_64bit( nVars )*sizeof(word);
- memcpy(pMinimal, pInOut, blockSize);
- memcpy(PDuplicat, pInOut, blockSize);
+ memcpy(pMinimal, pInOut, (size_t)blockSize);
+ memcpy(PDuplicat, pInOut, (size_t)blockSize);
Kit_TruthChangePhase_64bit( pInOut, nVars, 0 );
for(i=1;i<nVars;i++)
{
if( memCompare(pMinimal,pInOut,nVars) == 1)
{
- memcpy(pMinimal, pInOut, blockSize);
+ memcpy(pMinimal, pInOut, (size_t)blockSize);
Kit_TruthChangePhase_64bit( pInOut, nVars, i );
}
else
{
- memcpy(pInOut, pMinimal, blockSize);
+ memcpy(pInOut, pMinimal, (size_t)blockSize);
Kit_TruthChangePhase_64bit( pInOut, nVars, i );
}
}
if( memCompare(pMinimal,pInOut,nVars) == -1)
- memcpy(pInOut, pMinimal, blockSize);
- if(memcmp(pInOut,PDuplicat,blockSize) == 0)
+ memcpy(pInOut, pMinimal, (size_t)blockSize);
+ if(memcmp(pInOut,PDuplicat,(size_t)blockSize) == 0)
return 0;
else
return 1;
@@ -333,25 +333,25 @@ int minimalSwap1(word* pInOut, word* pMinimal, word* PDuplicat, int nVars)
{
int i;
int blockSize = Kit_TruthWordNum_64bit( nVars )*sizeof(word);
- memcpy(pMinimal, pInOut, blockSize);
- memcpy(PDuplicat, pInOut, blockSize);
+ memcpy(pMinimal, pInOut, (size_t)blockSize);
+ memcpy(PDuplicat, pInOut, (size_t)blockSize);
Kit_TruthSwapAdjacentVars_64bit( pInOut, nVars, 0 );
for(i=1;i<nVars-1;i++)
{
if( memCompare(pMinimal,pInOut,nVars) == 1)
{
- memcpy(pMinimal, pInOut, blockSize);
+ memcpy(pMinimal, pInOut, (size_t)blockSize);
Kit_TruthSwapAdjacentVars_64bit( pInOut, nVars, i );
}
else
{
- memcpy(pInOut, pMinimal, blockSize);
+ memcpy(pInOut, pMinimal, (size_t)blockSize);
Kit_TruthSwapAdjacentVars_64bit( pInOut, nVars, i );
}
}
if( memCompare(pMinimal,pInOut,nVars) == -1)
- memcpy(pInOut, pMinimal, blockSize);
- if(memcmp(pInOut,PDuplicat,blockSize) == 0)
+ memcpy(pInOut, pMinimal, (size_t)blockSize);
+ if(memcmp(pInOut,PDuplicat,(size_t)blockSize) == 0)
return 0;
else
return 1;
@@ -380,20 +380,20 @@ int minimalFlip(word* pInOut, word* pMinimal, word* PDuplicat, int nVars, unsig
int i;
unsigned minTemp = *p_uCanonPhase;
int blockSize = Kit_TruthWordNum_64bit( nVars )*sizeof(word);
- memcpy(pMinimal, pInOut, blockSize);
- memcpy(PDuplicat, pInOut, blockSize); //////////////need one more unsigned!!!!!!!!!!!!!
+ memcpy(pMinimal, pInOut, (size_t)blockSize);
+ memcpy(PDuplicat, pInOut, (size_t)blockSize); //////////////need one more unsigned!!!!!!!!!!!!!
Kit_TruthChangePhase_64bit( pInOut, nVars, 0 );
*p_uCanonPhase ^= (unsigned)1;
for(i=1;i<nVars;i++)
{
if( memCompare(pMinimal,pInOut,nVars) == 1)
{
- memcpy(pMinimal, pInOut, blockSize);
+ memcpy(pMinimal, pInOut, (size_t)blockSize);
minTemp = *p_uCanonPhase;
}
else
{
- memcpy(pInOut, pMinimal, blockSize);
+ memcpy(pInOut, pMinimal, (size_t)blockSize);
*p_uCanonPhase = minTemp;
}
Kit_TruthChangePhase_64bit( pInOut, nVars, i );
@@ -401,10 +401,10 @@ int minimalFlip(word* pInOut, word* pMinimal, word* PDuplicat, int nVars, unsig
}
if( memCompare(pMinimal,pInOut,nVars) == -1)
{
- memcpy(pInOut, pMinimal, blockSize);
+ memcpy(pInOut, pMinimal, (size_t)blockSize);
*p_uCanonPhase = minTemp;
}
- if(memcmp(pInOut,PDuplicat,blockSize) == 0)
+ if(memcmp(pInOut,PDuplicat,(size_t)blockSize) == 0)
return 0;
else
return 1;
@@ -478,24 +478,24 @@ int minimalSwap(word* pInOut, word* pMinimal, word* PDuplicat, int nVars, char
int blockSizeWord = Kit_TruthWordNum_64bit( nVars )*sizeof(word);
int blockSizeChar = nVars *sizeof(char);
unsigned TempuCanonPhase = *p_uCanonPhase;
- memcpy(pMinimal, pInOut, blockSizeWord);
- memcpy(PDuplicat, pInOut, blockSizeWord);
- memcpy(tempArray, pCanonPerm, blockSizeChar);
+ memcpy(pMinimal, pInOut, (size_t)blockSizeWord);
+ memcpy(PDuplicat, pInOut, (size_t)blockSizeWord);
+ memcpy(tempArray, pCanonPerm, (size_t)blockSizeChar);
Kit_TruthSwapAdjacentVars_64bit( pInOut, nVars, 0 );
swapInfoAdjacentVars(0, pCanonPerm, p_uCanonPhase);
for(i=1;i<nVars-1;i++)
{
if( memCompare(pMinimal,pInOut,nVars) == 1)
{
- memcpy(pMinimal, pInOut, blockSizeWord);
- memcpy(tempArray, pCanonPerm, blockSizeChar);
+ memcpy(pMinimal, pInOut, (size_t)blockSizeWord);
+ memcpy(tempArray, pCanonPerm, (size_t)blockSizeChar);
TempuCanonPhase = *p_uCanonPhase;
}
else
{
- memcpy(pInOut, pMinimal, blockSizeWord);
- memcpy(pCanonPerm, tempArray, blockSizeChar);
+ memcpy(pInOut, pMinimal, (size_t)blockSizeWord);
+ memcpy(pCanonPerm, tempArray, (size_t)blockSizeChar);
*p_uCanonPhase = TempuCanonPhase;
}
Kit_TruthSwapAdjacentVars_64bit( pInOut, nVars, i );
@@ -503,11 +503,11 @@ int minimalSwap(word* pInOut, word* pMinimal, word* PDuplicat, int nVars, char
}
if( memCompare(pMinimal,pInOut,nVars) == -1)
{
- memcpy(pInOut, pMinimal, blockSizeWord);
- memcpy(pCanonPerm, tempArray, blockSizeChar);
+ memcpy(pInOut, pMinimal, (size_t)blockSizeWord);
+ memcpy(pCanonPerm, tempArray, (size_t)blockSizeChar);
*p_uCanonPhase = TempuCanonPhase;
}
- if(memcmp(pInOut,PDuplicat,blockSizeWord) == 0)
+ if(memcmp(pInOut,PDuplicat,(size_t)blockSizeWord) == 0)
return 0;
else
return 1;
diff --git a/src/bool/lucky/luckyFast16.c b/src/bool/lucky/luckyFast16.c
index 84ec3bae..69c32442 100644
--- a/src/bool/lucky/luckyFast16.c
+++ b/src/bool/lucky/luckyFast16.c
@@ -285,13 +285,13 @@ void arrangeQuoters_superFast_iVar5(unsigned* pInOut, unsigned* temp, int start,
for(i=start-1;i>0;i-=shiftSize)
{
tempPtr -= 1;
- memcpy(tempPtr, pInOut+i-iQ, blockSize);
+ memcpy(tempPtr, pInOut+i-iQ, (size_t)blockSize);
tempPtr -= 1;
- memcpy(tempPtr, pInOut+i-jQ, blockSize);
+ memcpy(tempPtr, pInOut+i-jQ, (size_t)blockSize);
tempPtr -= 1;
- memcpy(tempPtr, pInOut+i-kQ, blockSize);
+ memcpy(tempPtr, pInOut+i-kQ, (size_t)blockSize);
tempPtr -= 1;
- memcpy(tempPtr, pInOut+i-lQ, blockSize);
+ memcpy(tempPtr, pInOut+i-lQ, (size_t)blockSize);
}
memcpy(pInOut, temp, start*sizeof(unsigned));
updataInfo(iQ, jQ, 5, pCanonPerm, pCanonPhase);
@@ -462,13 +462,13 @@ void arrangeQuoters_superFast_moreThen5(word* pInOut, word* temp, int start, in
for(i=start-wordBlock;i>0;i-=shiftSize)
{
tempPtr -= wordBlock;
- memcpy(tempPtr, pInOut+i-iQ*wordBlock, blockSize);
+ memcpy(tempPtr, pInOut+i-iQ*wordBlock, (size_t)blockSize);
tempPtr -= wordBlock;
- memcpy(tempPtr, pInOut+i-jQ*wordBlock, blockSize);
+ memcpy(tempPtr, pInOut+i-jQ*wordBlock, (size_t)blockSize);
tempPtr -= wordBlock;
- memcpy(tempPtr, pInOut+i-kQ*wordBlock, blockSize);
+ memcpy(tempPtr, pInOut+i-kQ*wordBlock, (size_t)blockSize);
tempPtr -= wordBlock;
- memcpy(tempPtr, pInOut+i-lQ*wordBlock, blockSize);
+ memcpy(tempPtr, pInOut+i-lQ*wordBlock, (size_t)blockSize);
}
memcpy(pInOut, temp, start*sizeof(word));
updataInfo(iQ, jQ, iVar, pCanonPerm, pCanonPhase);
diff --git a/src/bool/lucky/luckySwap.c b/src/bool/lucky/luckySwap.c
index 0b7493d8..bfa58697 100644
--- a/src/bool/lucky/luckySwap.c
+++ b/src/bool/lucky/luckySwap.c
@@ -115,9 +115,9 @@ void Kit_TruthChangePhase_64bit( word * pInOut, int nVars, int iVar )
SizeOfBlock = sizeof(word)*Step;
for ( i = 0; i < nWords; i += 2*Step )
{
- memcpy(Temp,pInOut,SizeOfBlock);
- memcpy(pInOut,pInOut+Step,SizeOfBlock);
- memcpy(pInOut+Step,Temp,SizeOfBlock);
+ memcpy(Temp,pInOut,(size_t)SizeOfBlock);
+ memcpy(pInOut,pInOut+Step,(size_t)SizeOfBlock);
+ memcpy(pInOut+Step,Temp,(size_t)SizeOfBlock);
// Temp = pInOut[i];
// pInOut[i] = pInOut[Step+i];
// pInOut[Step+i] = Temp;
@@ -165,9 +165,9 @@ void Kit_TruthSwapAdjacentVars_64bit( word * pInOut, int nVars, int iVar )
pInOut += 2*Step;
for(i=2*Step; i<nWords; i+=4*Step)
{
- memcpy(temp,pInOut-Step,SizeOfBlock);
- memcpy(pInOut-Step,pInOut,SizeOfBlock);
- memcpy(pInOut,temp,SizeOfBlock);
+ memcpy(temp,pInOut-Step,(size_t)SizeOfBlock);
+ memcpy(pInOut-Step,pInOut,(size_t)SizeOfBlock);
+ memcpy(pInOut,temp,(size_t)SizeOfBlock);
pInOut += 4*Step;
}
}
diff --git a/src/bool/lucky/luckySwapIJ.c b/src/bool/lucky/luckySwapIJ.c
index 44144564..fcedbb93 100644
--- a/src/bool/lucky/luckySwapIJ.c
+++ b/src/bool/lucky/luckySwapIJ.c
@@ -80,9 +80,9 @@ void swap_ij_case3( word* f,int totalVars, int i, int j)
for(y=wwj/2; y<WORDS_IN_TT; y+=wwj)
for(x=y-shift; x<y; x+=wwi)
{
- memcpy(temp,&f[x],SizeOfBlock);
- memcpy(&f[x],&f[x+shift],SizeOfBlock);
- memcpy(&f[x+shift],temp,SizeOfBlock);
+ memcpy(temp,&f[x],(size_t)SizeOfBlock);
+ memcpy(&f[x],&f[x+shift],(size_t)SizeOfBlock);
+ memcpy(&f[x+shift],temp,(size_t)SizeOfBlock);
}
}
void swap_ij( word* f,int totalVars, int varI, int varJ)