Unignore and fix warnings elsewhere

This commit is contained in:
Birunthan Mohanathas
2013-12-23 19:44:42 +00:00
parent a577608835
commit c196396ad0
36 changed files with 61 additions and 81 deletions

View File

@ -51,7 +51,7 @@ bool FontCollectionD2D::InitializeCollection()
loader, &m_FileReferences, sizeof(m_FileReferences), &m_Collection);
}
return m_Collection;
return m_Collection != nullptr;
}
bool FontCollectionD2D::AddFile(const WCHAR* file)

View File

@ -375,7 +375,7 @@ const WCHAR* Parse(
{
Operation op;
if (lexer.nameLen <= FUNC_MAX_LEN &&
((op.funcIndex = GetFunctionIndex(lexer.name, lexer.nameLen)) != FUNC_INVALID))
((op.funcIndex = GetFunctionIndex(lexer.name, (BYTE)lexer.nameLen)) != FUNC_INVALID))
{
switch (op.funcIndex)
{
@ -402,13 +402,13 @@ const WCHAR* Parse(
else
{
double dblval;
if (getValue && getValue(lexer.name, lexer.nameLen, &dblval, getValueContext))
if (getValue && getValue(lexer.name, (int)lexer.nameLen, &dblval, getValueContext))
{
parser.numStack[++parser.valTop] = dblval;
break;
}
std::wstring name(lexer.name, lexer.nameLen);
const std::wstring name(lexer.name, lexer.nameLen);
_snwprintf_s(errorBuffer, _TRUNCATE, eUnknFunc, name.c_str());
return errorBuffer;
}

View File

@ -49,7 +49,7 @@ std::wstring Widen(const char* str, int strLen, int cp)
{
if (strLen == -1)
{
strLen = strlen(str);
strLen = (int)strlen(str);
}
int bufLen = MultiByteToWideChar(cp, 0, str, strLen, nullptr, 0);