From a6e2a4eca1be4daf14fae4e2427a6ca76269db43 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Fri, 30 Oct 2015 13:07:00 -0700 Subject: More chromium_code whack-a-mole. BUG=pdfium:29 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1419943006 . --- BUILD.gn | 2 ++ core/src/fxge/win32/fx_win32_device.cpp | 4 +--- core/src/fxge/win32/fx_win32_gdipext.cpp | 1 - core/src/fxge/win32/fx_win32_print.cpp | 4 +--- pdfium.gyp | 2 +- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 3e1b89c366..120abc2fe2 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -40,8 +40,10 @@ config("pdfium_config") { "/wd4345", # TODO(thestig): Fix all instances, remove this, pdfium:29 "/wd4245", + "/wd4310", "/wd4389", "/wd4701", + "/wd4702", "/wd4706", "/wd4800", ] diff --git a/core/src/fxge/win32/fx_win32_device.cpp b/core/src/fxge/win32/fx_win32_device.cpp index 93c2fd6836..a32f9ade78 100644 --- a/core/src/fxge/win32/fx_win32_device.cpp +++ b/core/src/fxge/win32/fx_win32_device.cpp @@ -358,7 +358,7 @@ void* CFX_Win32FontInfo::MapFont(int weight, OUT_TT_ONLY_PRECIS, 0, 0, subst_pitch_family, face); char facebuf[100]; HFONT hOldFont = (HFONT)::SelectObject(m_hDC, hFont); - int ret = ::GetTextFaceA(m_hDC, 100, facebuf); + ::GetTextFaceA(m_hDC, 100, facebuf); ::SelectObject(m_hDC, hOldFont); if (face.EqualNoCase(facebuf)) { return hFont; @@ -536,7 +536,6 @@ FX_BOOL CGdiDeviceDriver::GDI_SetDIBits(const CFX_DIBitmap* pBitmap1, return FALSE; } int width = pSrcRect->Width(), height = pSrcRect->Height(); - int pitch = pBitmap->GetPitch(); LPBYTE pBuffer = pBitmap->GetBuffer(); CFX_ByteString info = CFX_WindowsDIB::GetBitmapInfo(pBitmap); ((BITMAPINFOHEADER*)info.c_str())->biHeight *= -1; @@ -556,7 +555,6 @@ FX_BOOL CGdiDeviceDriver::GDI_SetDIBits(const CFX_DIBitmap* pBitmap1, return FALSE; } int width = pSrcRect->Width(), height = pSrcRect->Height(); - int pitch = pBitmap->GetPitch(); LPBYTE pBuffer = pBitmap->GetBuffer(); CFX_ByteString info = CFX_WindowsDIB::GetBitmapInfo(pBitmap); ::SetDIBitsToDevice(m_hDC, left, top, width, height, pSrcRect->left, diff --git a/core/src/fxge/win32/fx_win32_gdipext.cpp b/core/src/fxge/win32/fx_win32_gdipext.cpp index 4beef9a177..2022a5f957 100644 --- a/core/src/fxge/win32/fx_win32_gdipext.cpp +++ b/core/src/fxge/win32/fx_win32_gdipext.cpp @@ -484,7 +484,6 @@ static CFX_DIBitmap* _StretchMonoToGray(int dest_width, int src_height = pSource->GetHeight(); int src_count = src_width * src_height; int dest_count = dest_width * dest_height; - int ratio = 255 * dest_count / src_count; int y_unit = src_height / dest_height; int x_unit = src_width / dest_width; int area_unit = y_unit * x_unit; diff --git a/core/src/fxge/win32/fx_win32_print.cpp b/core/src/fxge/win32/fx_win32_print.cpp index 18fe1eb6fa..0f75d493a4 100644 --- a/core/src/fxge/win32/fx_win32_print.cpp +++ b/core/src/fxge/win32/fx_win32_print.cpp @@ -138,8 +138,6 @@ static CFX_DIBitmap* Transform1bppBitmap(const CFX_DIBSource* pSrc, pSrc->GetFormat() == FXDIB_1bppCmyk); CFX_FloatRect unit_rect = pDestMatrix->GetUnitRect(); FX_RECT full_rect = unit_rect.GetOutterRect(); - int full_left = full_rect.left; - int full_top = full_rect.top; CFX_DIBExtractor src_bitmap(pSrc); CFX_DIBitmap* pSrcBitmap = src_bitmap; if (pSrcBitmap == NULL) { @@ -297,7 +295,7 @@ void CPSOutput::OutputPS(const FX_CHAR* string, int len) { int send_len = len > 1024 ? 1024 : len; *(FX_WORD*)m_pBuf = send_len; FXSYS_memcpy(m_pBuf + 2, string + sent_len, send_len); - int ret = ExtEscape(m_hDC, PASSTHROUGH, send_len + 2, m_pBuf, 0, NULL); + ExtEscape(m_hDC, PASSTHROUGH, send_len + 2, m_pBuf, 0, NULL); sent_len += send_len; len -= send_len; } diff --git a/pdfium.gyp b/pdfium.gyp index 5637dbbf9b..a7187de928 100644 --- a/pdfium.gyp +++ b/pdfium.gyp @@ -43,7 +43,7 @@ 'msvs_disabled_warnings': [ 4005, 4018, 4146, 4333, 4345, 4267, # TODO(thestig): Fix all instances, remove this, pdfium:29 - 4245, 4389, 4701, 4706, 4800, + 4245, 4310, 4389, 4701, 4702, 4706, 4800, ], 'variables': { 'clang_warning_flags': [ -- cgit v1.2.3