summaryrefslogtreecommitdiffstats
path: root/src/misc/vec/vecBit.h
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2019-03-05 16:26:42 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2019-03-05 16:26:42 -0800
commit3cce04c62daf75aaf156246b6fc0498f0106f76d (patch)
tree4f56e7fd2acd09c5e6dd2a199612f73fab14b98a /src/misc/vec/vecBit.h
parentf657d9a7e6aedbb33063d050bc65d8eb3c95098b (diff)
downloadabc-3cce04c62daf75aaf156246b6fc0498f0106f76d.tar.gz
abc-3cce04c62daf75aaf156246b6fc0498f0106f76d.tar.bz2
abc-3cce04c62daf75aaf156246b6fc0498f0106f76d.zip
Fixing some more warnings by adding cast from 'int' to 'size_t'.
Diffstat (limited to 'src/misc/vec/vecBit.h')
-rw-r--r--src/misc/vec/vecBit.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/misc/vec/vecBit.h b/src/misc/vec/vecBit.h
index 543a1258..e41d95aa 100644
--- a/src/misc/vec/vecBit.h
+++ b/src/misc/vec/vecBit.h
@@ -105,7 +105,7 @@ static inline Vec_Bit_t * Vec_BitStart( int nSize )
nSize = (nSize >> 5) + ((nSize & 31) > 0);
p = Vec_BitAlloc( nSize * 32 );
p->nSize = nSize * 32;
- memset( p->pArray, 0, sizeof(int) * nSize );
+ memset( p->pArray, 0, sizeof(int) * (size_t)nSize );
return p;
}
@@ -126,7 +126,7 @@ static inline Vec_Bit_t * Vec_BitStartFull( int nSize )
nSize = (nSize >> 5) + ((nSize & 31) > 0);
p = Vec_BitAlloc( nSize * 32 );
p->nSize = nSize * 32;
- memset( p->pArray, 0xff, sizeof(int) * nSize );
+ memset( p->pArray, 0xff, sizeof(int) * (size_t)nSize );
return p;
}
@@ -149,7 +149,7 @@ static inline Vec_Bit_t * Vec_BitDup( Vec_Bit_t * pVec )
p->nSize = pVec->nSize;
p->nCap = pVec->nSize;
p->pArray = p->nCap? ABC_ALLOC( int, p->nCap >> 5 ) : NULL;
- memcpy( p->pArray, pVec->pArray, sizeof(int) * (p->nCap >> 5) );
+ memcpy( p->pArray, pVec->pArray, sizeof(int) * (size_t)(p->nCap >> 5) );
return p;
}