summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_edit
diff options
context:
space:
mode:
authorWei Li <weili@chromium.org>2016-03-21 11:20:44 -0700
committerWei Li <weili@chromium.org>2016-03-21 11:20:44 -0700
commitd4e8f1222ca17b57ac74019b2fc3706e1192645c (patch)
tree0dd5e1627fd684205631f875cbf5946178177766 /core/fpdfapi/fpdf_edit
parent34fa8d90ae2f60fae219e4dbeff14c053d2e8eef (diff)
downloadpdfium-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_edit')
-rw-r--r--core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp b/core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
index 42315dad53..2fddf10a78 100644
--- a/core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
+++ b/core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
@@ -924,7 +924,7 @@ CPDF_Font* CPDF_Document::AddFont(CFX_Font* pFont, int charset, FX_BOOL bVert) {
pFontDict = new CPDF_Dictionary;
CFX_ByteString cmap;
CFX_ByteString ordering;
- int supplement;
+ int supplement = 0;
CPDF_Array* pWidthArray = new CPDF_Array;
switch (charset) {
case FXFONT_CHINESEBIG5_CHARSET:
@@ -936,7 +936,8 @@ CPDF_Font* CPDF_Document::AddFont(CFX_Font* pFont, int charset, FX_BOOL bVert) {
break;
case FXFONT_GB2312_CHARSET:
cmap = bVert ? "GBK-EUC-V" : "GBK-EUC-H";
- ordering = "GB1", supplement = 2;
+ ordering = "GB1";
+ supplement = 2;
pWidthArray->AddInteger(7716);
_InsertWidthArray1(pFont, pEncoding.get(), 0x20, 0x20, pWidthArray);
pWidthArray->AddInteger(814);