summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/standalone.gypi9
-rw-r--r--core/src/fpdftext/fpdf_text_int.cpp8
-rw-r--r--fpdfsdk/include/fsdk_mgr.h8
-rw-r--r--fpdfsdk/src/fpdfformfill.cpp3
-rw-r--r--fpdfsdk/src/fsdk_mgr.cpp5
-rw-r--r--pdfium.gyp7
-rw-r--r--xfa/src/fxfa/src/parser/xfa_localevalue.cpp2
7 files changed, 30 insertions, 12 deletions
diff --git a/build/standalone.gypi b/build/standalone.gypi
index d335f05e49..0d650a3bdc 100644
--- a/build/standalone.gypi
+++ b/build/standalone.gypi
@@ -165,6 +165,7 @@
'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
'CharacterSet': '1',
},
+ 'msvs_disabled_warnings': [4800, 4996],
'msvs_settings': {
'VCCLCompilerTool': {
'MinimalRebuild': 'false',
@@ -172,7 +173,6 @@
'EnableFunctionLevelLinking': 'true',
'RuntimeTypeInfo': 'false',
'WarningLevel': '3',
- 'WarnAsError': 'false',
'DebugInformationFormat': '3',
'Detect64BitPortabilityProblems': 'false',
'conditions': [
@@ -184,6 +184,13 @@
}, {
'ExceptionHandling': '0',
}],
+ ['target_arch=="x64"', {
+ # 64-bit warnings need to be resolved.
+ # https://code.google.com/p/pdfium/issues/detail?id=101
+ 'WarnAsError': 'false',
+ }, {
+ 'WarnAsError': 'true',
+ }],
],
},
'VCLibrarianTool': {
diff --git a/core/src/fpdftext/fpdf_text_int.cpp b/core/src/fpdftext/fpdf_text_int.cpp
index c28647dc17..5ed0e01ab9 100644
--- a/core/src/fpdftext/fpdf_text_int.cpp
+++ b/core/src/fpdftext/fpdf_text_int.cpp
@@ -37,13 +37,13 @@ FX_BOOL _IsIgnoreSpaceCharacter(FX_WCHAR curChar)
FX_FLOAT _NormalizeThreshold(FX_FLOAT threshold)
{
if (threshold < 300) {
- return threshold / 2.0;
+ return threshold / 2.0f;
} else if (threshold < 500) {
- return threshold / 4.0;
+ return threshold / 4.0f;
} else if (threshold < 700) {
- return threshold / 5.0;
+ return threshold / 5.0f;
}
- return threshold / 6.0;
+ return threshold / 6.0f;
}
FX_FLOAT _CalculateBaseSpace(const CPDF_TextObject* pTextObj,
diff --git a/fpdfsdk/include/fsdk_mgr.h b/fpdfsdk/include/fsdk_mgr.h
index cbe47418fc..357be3cf0f 100644
--- a/fpdfsdk/include/fsdk_mgr.h
+++ b/fpdfsdk/include/fsdk_mgr.h
@@ -476,10 +476,10 @@ public:
double bottom;
m_pInfo->FFI_GetPageViewRect(m_pInfo, page, &left, &top, &right, &bottom);
- dstRect.left = left;
- dstRect.top = top < bottom? bottom:top;
- dstRect.bottom = top < bottom? top:bottom;
- dstRect.right = right;
+ dstRect.left = static_cast<float>(left);
+ dstRect.top = static_cast<float>(top < bottom ? bottom : top);
+ dstRect.bottom = static_cast<float>(top < bottom ? top : bottom);
+ dstRect.right = static_cast<float>(right);
}
}
diff --git a/fpdfsdk/src/fpdfformfill.cpp b/fpdfsdk/src/fpdfformfill.cpp
index 0fb32919e1..ea94925d63 100644
--- a/fpdfsdk/src/fpdfformfill.cpp
+++ b/fpdfsdk/src/fpdfformfill.cpp
@@ -71,7 +71,8 @@ DLLEXPORT int STDCALL FPDPage_HasFormFieldAtPoint(FPDF_FORMHANDLE hHandle, FPDF_
rcWidget.bottom -= 1.0f;
rcWidget.top += 1.0f;
- if (rcWidget.Contains(page_x, page_y)) {
+ if (rcWidget.Contains(static_cast<FX_FLOAT>(page_x),
+ static_cast<FX_FLOAT>(page_y))) {
pWidgetIterator->Release();
return FPDF_FORMFIELD_XFA;
}
diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp
index c4cee6f4d8..f134b790a9 100644
--- a/fpdfsdk/src/fsdk_mgr.cpp
+++ b/fpdfsdk/src/fsdk_mgr.cpp
@@ -678,7 +678,10 @@ void CPDFSDK_PageView::PageView_OnDraw(CFX_RenderDevice* pDevice, CPDF_Matrix* p
gs.Create(pDevice);
if (pClip) {
CFX_RectF rectClip;
- rectClip.Set(pClip->left, pClip->top, pClip->Width(), pClip->Height());
+ rectClip.Set(static_cast<FX_FLOAT>(pClip->left),
+ static_cast<FX_FLOAT>(pClip->top),
+ static_cast<FX_FLOAT>(pClip->Width()),
+ static_cast<FX_FLOAT>(pClip->Height()));
gs.SetClipRect(rectClip);
}
IXFA_RenderContext* pRenderContext = XFA_RenderContext_Create();
diff --git a/pdfium.gyp b/pdfium.gyp
index 1f852d6c76..9476241326 100644
--- a/pdfium.gyp
+++ b/pdfium.gyp
@@ -309,6 +309,13 @@
'include_dirs': [
],
'ldflags': [ '-L<(PRODUCT_DIR)',],
+ 'msvs_settings': {
+ 'VCCLCompilerTool': {
+ # Unresolved warnings in fx_codec_jpx_opj.cpp
+ # https://code.google.com/p/pdfium/issues/detail?id=100
+ 'WarnAsError': 'false',
+ },
+ },
'sources': [
'core/include/fxcodec/fx_codec.h',
'core/include/fxcodec/fx_codec_def.h',
diff --git a/xfa/src/fxfa/src/parser/xfa_localevalue.cpp b/xfa/src/fxfa/src/parser/xfa_localevalue.cpp
index 6d55defac3..46ea47dc5d 100644
--- a/xfa/src/fxfa/src/parser/xfa_localevalue.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_localevalue.cpp
@@ -650,7 +650,7 @@ FX_BOOL CXFA_LocaleValue::ValidateCanonicalDate(const CFX_WideString& wsDate, CF
return FALSE;
}
CFX_Unitime ut;
- ut.Set(wYear, wMonth, wDay);
+ ut.Set(wYear, static_cast<FX_BYTE>(wMonth), static_cast<FX_BYTE>(wDay));
unDate = unDate + ut;
return TRUE;
}