Fixed minor warnings (signed/unsigned compare).

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4402 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
ejakowatz 2003-08-29 22:30:27 +00:00
parent c9aa6219cc
commit 169ae2662c
4 changed files with 8 additions and 8 deletions

View File

@ -130,7 +130,7 @@ struct TBStringAssertPolicy
};
bool TBStringAssertPolicy::Size(size_t size, BString& data)
{
return size == data.Length() + 1;
return size == (size_t)data.Length() + 1;
}
//------------------------------------------------------------------------------
typedef TMessageItemTest

View File

@ -167,7 +167,7 @@ struct TFlattenableAssertPolicy
bool TFlattenableAssertPolicy::Size(size_t size, MyFlattenableType& flat)
{
ssize_t flatSize = flat.FlattenedSize();
return size == flatSize;
return size == (size_t)flatSize;
}
//------------------------------------------------------------------------------
template<>

View File

@ -335,12 +335,12 @@ MessageItemTest5()
TypePtr pout;
ssize_t size;
for (int32 i = 0; i < InitPolicy::Size(in); ++i)
for (uint32 i = 0; i < InitPolicy::Size(in); ++i)
{
CPPUNIT_ASSERT(FuncPolicy::Add(msg, "item", in[i]) == B_OK);
}
for (int32 i = 0; i < InitPolicy::Size(in); ++i)
for (uint32 i = 0; i < InitPolicy::Size(in); ++i)
{
CPPUNIT_ASSERT(FuncPolicy::Has(msg, "item", i));
CPPUNIT_ASSERT(ComparePolicy::Compare(FuncPolicy::QuickFind(msg, "item", i),
@ -373,7 +373,7 @@ MessageItemTest6()
Type out = InitPolicy::Zero();
const int rIndex = 2;
for (int32 i = 0; i < InitPolicy::Size(in); ++i)
for (uint32 i = 0; i < InitPolicy::Size(in); ++i)
{
CPPUNIT_ASSERT(FuncPolicy::Add(msg, "item", in[i]) == B_OK);
}
@ -445,14 +445,14 @@ MessageItemTest8()
Type out = InitPolicy::Zero();
TypePtr pout;
ssize_t size;
for (int32 i = 0; i < InitPolicy::Size(in); ++i)
for (uint32 i = 0; i < InitPolicy::Size(in); ++i)
{
CPPUNIT_ASSERT(FuncPolicy::AddData(msg, "item", TypeCode,
AddressOf(in[i]), InitPolicy::SizeOf(in[i]),
TypePolicy<Type>::FixedSize) == B_OK);
}
for (int32 i = 0; i < InitPolicy::Size(in); ++i)
for (uint32 i = 0; i < InitPolicy::Size(in); ++i)
{
CPPUNIT_ASSERT(FuncPolicy::Has(msg, "item", i));
CPPUNIT_ASSERT(ComparePolicy::Compare(FuncPolicy::QuickFind(msg, "item", i),

View File

@ -200,7 +200,7 @@ struct TMessageAssertPolicy
bool TMessageAssertPolicy::Size(size_t size, BMessage& msg)
{
ssize_t msgSize = msg.FlattenedSize();
return size == msgSize;
return size == (size_t)msgSize;
}
//------------------------------------------------------------------------------
template<>