summaryrefslogtreecommitdiff
path: root/Types.h
diff options
context:
space:
mode:
authoraappleby@google.com <aappleby@google.com@77a7d1d3-4c08-bdc2-d393-d5859734b01a>2011-04-13 23:23:14 +0000
committeraappleby@google.com <aappleby@google.com@77a7d1d3-4c08-bdc2-d393-d5859734b01a>2011-04-13 23:23:14 +0000
commita27c28138be78f35f76ea9c13c6354be47097985 (patch)
tree41f069b6c91274a082b0a53466f3921bce02c9f7 /Types.h
parent510b8528df1cc38c289abf5e9c3c689e979a6cc3 (diff)
downloadsrc-a27c28138be78f35f76ea9c13c6354be47097985.tar.gz
Enable all gcc warnings except strict aliasing, fix build issues
git-svn-id: http://smhasher.googlecode.com/svn/trunk@133 77a7d1d3-4c08-bdc2-d393-d5859734b01a
Diffstat (limited to 'Types.h')
-rw-r--r--Types.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/Types.h b/Types.h
index 8814093..ee7ae9d 100644
--- a/Types.h
+++ b/Types.h
@@ -195,7 +195,7 @@ public:
Blob()
{
- for(int i = 0; i < sizeof(bytes); i++)
+ for(size_t i = 0; i < sizeof(bytes); i++)
{
bytes[i] = 0;
}
@@ -203,7 +203,7 @@ public:
Blob ( int x )
{
- for(int i = 0; i < sizeof(bytes); i++)
+ for(size_t i = 0; i < sizeof(bytes); i++)
{
bytes[i] = 0;
}
@@ -213,7 +213,7 @@ public:
Blob ( const Blob & k )
{
- for(int i = 0; i < sizeof(bytes); i++)
+ for(size_t i = 0; i < sizeof(bytes); i++)
{
bytes[i] = k.bytes[i];
}
@@ -221,7 +221,7 @@ public:
Blob & operator = ( const Blob & k )
{
- for(int i = 0; i < sizeof(bytes); i++)
+ for(size_t i = 0; i < sizeof(bytes); i++)
{
bytes[i] = k.bytes[i];
}
@@ -235,18 +235,18 @@ public:
set(&t,16);
}
- void set ( const void * blob, int len )
+ void set ( const void * blob, size_t len )
{
const uint8_t * k = (const uint8_t*)blob;
len = len > sizeof(bytes) ? sizeof(bytes) : len;
- for(int i = 0; i < len; i++)
+ for(size_t i = 0; i < len; i++)
{
bytes[i] = k[i];
}
- for(int i = len; i < sizeof(bytes); i++)
+ for(size_t i = len; i < sizeof(bytes); i++)
{
bytes[i] = 0;
}
@@ -267,7 +267,7 @@ public:
bool operator < ( const Blob & k ) const
{
- for(int i = 0; i < sizeof(bytes); i++)
+ for(size_t i = 0; i < sizeof(bytes); i++)
{
if(bytes[i] < k.bytes[i]) return true;
if(bytes[i] > k.bytes[i]) return false;
@@ -278,7 +278,7 @@ public:
bool operator == ( const Blob & k ) const
{
- for(int i = 0; i < sizeof(bytes); i++)
+ for(size_t i = 0; i < sizeof(bytes); i++)
{
if(bytes[i] != k.bytes[i]) return false;
}
@@ -298,7 +298,7 @@ public:
{
Blob t;
- for(int i = 0; i < sizeof(bytes); i++)
+ for(size_t i = 0; i < sizeof(bytes); i++)
{
t.bytes[i] = bytes[i] ^ k.bytes[i];
}
@@ -308,7 +308,7 @@ public:
Blob & operator ^= ( const Blob & k )
{
- for(int i = 0; i < sizeof(bytes); i++)
+ for(size_t i = 0; i < sizeof(bytes); i++)
{
bytes[i] ^= k.bytes[i];
}
@@ -323,7 +323,7 @@ public:
Blob & operator &= ( const Blob & k )
{
- for(int i = 0; i < sizeof(bytes); i++)
+ for(size_t i = 0; i < sizeof(bytes); i++)
{
bytes[i] &= k.bytes[i];
}