Fix KeyvaDB warnings

This commit is contained in:
Vinnie Falco
2013-08-22 21:51:15 -07:00
parent 0506a15209
commit 5e827ba863

View File

@@ -279,8 +279,8 @@ public:
}
}
state->newKeyIndex = 1 + (state->keyFile.getFile ().getSize () - masterHeaderBytes)
/ calcKeyRecordBytes (m_keyBytes);
state->newKeyIndex = 1 + static_cast <KeyIndex> ((state->keyFile.getFile ().getSize () - masterHeaderBytes)
/ calcKeyRecordBytes (m_keyBytes));
openFile (&state->valFile, valPath);
@@ -360,7 +360,7 @@ public:
if (result.wasOk ())
{
if (bytesRead == calcKeyRecordBytes (m_keyBytes))
if (bytesRead == static_cast <size_t> (calcKeyRecordBytes (m_keyBytes)))
{
MemoryInputStream stream (data, false);
@@ -425,7 +425,7 @@ public:
if (result.wasOk ())
{
if (bytesWritten != bytes)
if (bytesWritten != static_cast <size_t> (bytes))
{
result = Result::fail ("KeyvaDB: bytesWritten != bytes");
}