From 47ca692c8150cb39abef5737e866b91e6a105b80 Mon Sep 17 00:00:00 2001 From: weili Date: Thu, 31 Mar 2016 15:08:27 -0700 Subject: Re-enable all the windows warnings except 4267 The code is changed or had been changed to no longer generate these warnings. It is safe to re-enabled these warnings. In this code change, we fixed some code which generates warnings 4018 (signed/unsigned mismatch) and 4146 (unary minus operator applied to unsigned type, result still unsigned). Warning 4333 (right shift by too large amount, data loss) and 4345 (an object of POD type constructed with an initializer of the form () will be default-initialized) are no longer generated. The same setting is applied and verified for GN build as well. BUG=pdfium:29 Review URL: https://codereview.chromium.org/1849443003 --- core/fxge/ge/fx_ge_fontmap.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/fxge') diff --git a/core/fxge/ge/fx_ge_fontmap.cpp b/core/fxge/ge/fx_ge_fontmap.cpp index c6a6c5c003..c6b208c624 100644 --- a/core/fxge/ge/fx_ge_fontmap.cpp +++ b/core/fxge/ge/fx_ge_fontmap.cpp @@ -681,15 +681,17 @@ void CFX_FontMapper::SetSystemFontInfo(IFX_SystemFontInfo* pFontInfo) { } m_pFontInfo = pFontInfo; } + static CFX_ByteString GetStringFromTable(const uint8_t* string_ptr, uint32_t string_ptr_length, uint16_t offset, uint16_t length) { - if (string_ptr_length < offset + length) { + if (string_ptr_length < static_cast(offset + length)) { return CFX_ByteString(); } return CFX_ByteStringC(string_ptr + offset, length); } + CFX_ByteString GetNameFromTT(const uint8_t* name_table, uint32_t name_table_size, uint32_t name_id) { -- cgit v1.2.3