From d12a4f465a0bcc8b233079ccd54bf7882f3532d5 Mon Sep 17 00:00:00 2001 From: Bruce Dawson Date: Tue, 6 Jan 2015 13:12:09 -0800 Subject: Resolve all but two VC++ build warnings in pdfium. pdfium builds on Win32 have about 85 warnings (250 in the XFA branch, totaling over 480 lines!), mostly from four lines in a header file and a warning that should be disabled. This change resolves all but two of them and turns on warning-as-errors. Bugs have been filed for the two remaining warnings: https://code.google.com/p/pdfium/issues/detail?id=100 the 64-bit warnings: https://code.google.com/p/pdfium/issues/detail?id=101 and the Linux warnings: https://code.google.com/p/pdfium/issues/detail?id=102 The fix to the double->float truncation bugs will also improve code-generation. R=bo_xu@foxitsoftware.com, scottmg@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/792953005 --- build/standalone.gypi | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'build/standalone.gypi') 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': { -- cgit v1.2.3