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--pdfium.gyp7
3 files changed, 19 insertions, 5 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 c9cfbdda2d..70178a54b0 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/pdfium.gyp b/pdfium.gyp
index 0ac04715e4..f50005d10f 100644
--- a/pdfium.gyp
+++ b/pdfium.gyp
@@ -308,6 +308,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',