diff options
author | Wei Li <weili@chromium.org> | 2016-03-11 17:00:48 -0800 |
---|---|---|
committer | Wei Li <weili@chromium.org> | 2016-03-11 17:00:48 -0800 |
commit | 97da97662417085774f75c26e535c6fbe70266ae (patch) | |
tree | 9654be693dfb20b49be80911fa8089ff319757f3 /core/src/fxcrt | |
parent | 55265016faac358266af280db6c62afa34ce2891 (diff) | |
download | pdfium-97da97662417085774f75c26e535c6fbe70266ae.tar.xz |
Re-enable MSVC warning 4800 for compiling with chromium_code
Mainly change the code to avoid the warnings; in a few cases we have
to use explicit casts.
BUG=pdfium:29
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1783023002 .
Diffstat (limited to 'core/src/fxcrt')
-rw-r--r-- | core/src/fxcrt/fx_basic_buffer.cpp | 2 | ||||
-rw-r--r-- | core/src/fxcrt/fx_basic_wstring.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/core/src/fxcrt/fx_basic_buffer.cpp b/core/src/fxcrt/fx_basic_buffer.cpp index f623d995c7..a3039f4188 100644 --- a/core/src/fxcrt/fx_basic_buffer.cpp +++ b/core/src/fxcrt/fx_basic_buffer.cpp @@ -381,7 +381,7 @@ bool CFX_FileBufferArchive::Flush() { return false; if (!m_pBuffer || !nRemaining) return true; - return m_pFile->WriteBlock(m_pBuffer.get(), nRemaining); + return m_pFile->WriteBlock(m_pBuffer.get(), nRemaining) > 0; } int32_t CFX_FileBufferArchive::AppendBlock(const void* pBuf, size_t size) { diff --git a/core/src/fxcrt/fx_basic_wstring.cpp b/core/src/fxcrt/fx_basic_wstring.cpp index 11a840a806..95b761bd09 100644 --- a/core/src/fxcrt/fx_basic_wstring.cpp +++ b/core/src/fxcrt/fx_basic_wstring.cpp @@ -205,7 +205,7 @@ bool CFX_WideString::Equal(const wchar_t* ptr) const { if (!ptr) { return m_pData->m_nDataLength == 0; } - return wcslen(ptr) == m_pData->m_nDataLength && + return wcslen(ptr) == static_cast<size_t>(m_pData->m_nDataLength) && wmemcmp(ptr, m_pData->m_String, m_pData->m_nDataLength) == 0; } bool CFX_WideString::Equal(const CFX_WideStringC& str) const { |