From 3f49aa3ba3e8ba2fcedc8e2e2a88f3b06efd52b9 Mon Sep 17 00:00:00 2001 From: Bruce Dawson Date: Thu, 8 Jan 2015 11:47:49 -0800 Subject: XFA: merge patch from CL 792953005, fix most warnings Includes fixes to XFA specific warnings -- benign truncations. Bug https://code.google.com/p/pdfium/issues/detail?id=104 was filed to track changing types to avoid some truncations. 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, tsepez@chromium.org Review URL: https://codereview.chromium.org/792953005 BUG= https://code.google.com/p/pdfium/issues/detail?id=100 Review URL: https://codereview.chromium.org/834413002 --- xfa/src/fxfa/src/parser/xfa_localevalue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xfa/src') 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(wMonth), static_cast(wDay)); unDate = unDate + ut; return TRUE; } -- cgit v1.2.3