diff options
author | Wei Li <weili@chromium.org> | 2016-03-21 11:20:44 -0700 |
---|---|---|
committer | Wei Li <weili@chromium.org> | 2016-03-21 11:20:44 -0700 |
commit | d4e8f1222ca17b57ac74019b2fc3706e1192645c (patch) | |
tree | 0dd5e1627fd684205631f875cbf5946178177766 /core/fpdfapi/fpdf_render | |
parent | 34fa8d90ae2f60fae219e4dbeff14c053d2e8eef (diff) | |
download | pdfium-d4e8f1222ca17b57ac74019b2fc3706e1192645c.tar.xz |
Re-enable several MSVC warnings
Re-enable the following warnings:
4245: signed/unsigned conversion mismatch;
4310: cast may truncate data;
4389: operator on signed/unsigned mismatch;
4701: use potentially uninitialized local variable;
4706: assignment within conditional expression
Clean up the code to avoid those warnings.
BUG=pdfium:29
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1801383002 .
Diffstat (limited to 'core/fpdfapi/fpdf_render')
-rw-r--r-- | core/fpdfapi/fpdf_render/fpdf_render_text.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp index fe72bb3aee..6741d1a70b 100644 --- a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp +++ b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp @@ -140,12 +140,12 @@ CFX_GlyphBitmap* CPDF_Type3Cache::RenderGlyph(CPDF_Type3Glyphs* pSize, text_matrix.Set(pMatrix->a, pMatrix->b, pMatrix->c, pMatrix->d, 0, 0); image_matrix.Concat(text_matrix); CFX_DIBitmap* pResBitmap = NULL; - int left, top; + int left = 0; + int top = 0; if (FXSYS_fabs(image_matrix.b) < FXSYS_fabs(image_matrix.a) / 100 && FXSYS_fabs(image_matrix.c) < FXSYS_fabs(image_matrix.d) / 100) { - int top_line, bottom_line; - top_line = _DetectFirstLastScan(pBitmap, TRUE); - bottom_line = _DetectFirstLastScan(pBitmap, FALSE); + int top_line = _DetectFirstLastScan(pBitmap, TRUE); + int bottom_line = _DetectFirstLastScan(pBitmap, FALSE); if (top_line == 0 && bottom_line == pBitmap->GetHeight() - 1) { FX_FLOAT top_y = image_matrix.d + image_matrix.f; FX_FLOAT bottom_y = image_matrix.f; @@ -167,7 +167,6 @@ CFX_GlyphBitmap* CPDF_Type3Cache::RenderGlyph(CPDF_Type3Glyphs* pSize, } else { left = FXSYS_round(image_matrix.e); } - } else { } } if (!pResBitmap) { |