Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Issue 834413002: XFA: merge patch from CL 792953005, fix most VC++ warnings (Closed)

Created:
5 years, 11 months ago by brucedawson
Modified:
5 years, 11 months ago
Reviewers:
Bo Xu, Tom Sepez, Lei Zhang
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@xfa
Target Ref:
refs/heads/xfa
Visibility:
Public.

Description

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 Committed: https://pdfium.googlesource.com/pdfium/+/3f49aa3ba3e8ba2fcedc8e2e2a88f3b06efd52b9

Patch Set 1 #

Total comments: 5

Patch Set 2 : Fix spacing in conditional operator. #

Patch Set 3 : Pulled latest code. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -12 lines) Patch
M build/standalone.gypi View 3 chunks +8 lines, -1 line 0 comments Download
M core/src/fpdftext/fpdf_text_int.cpp View 1 chunk +4 lines, -4 lines 0 comments Download
M fpdfsdk/include/fsdk_mgr.h View 1 1 chunk +4 lines, -4 lines 0 comments Download
M fpdfsdk/src/fpdfformfill.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M fpdfsdk/src/fsdk_mgr.cpp View 1 chunk +4 lines, -1 line 0 comments Download
M pdfium.gyp View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M xfa/src/fxfa/src/parser/xfa_localevalue.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 16 (1 generated)
brucedawson
I had to make XFA specific fixes to fsdk_mgr.h, fpdfformfill.cpp, fsdk_mgr.cpp, and xfa_localevalue.cpp. Nothing big, ...
5 years, 11 months ago (2015-01-06 21:33:41 UTC) #1
Bo Xu
On 2015/01/06 21:33:41, brucedawson wrote: > I had to make XFA specific fixes to fsdk_mgr.h, ...
5 years, 11 months ago (2015-01-06 22:24:29 UTC) #2
Bo Xu
https://codereview.chromium.org/834413002/diff/1/xfa/src/fxfa/src/parser/xfa_localevalue.cpp File xfa/src/fxfa/src/parser/xfa_localevalue.cpp (right): https://codereview.chromium.org/834413002/diff/1/xfa/src/fxfa/src/parser/xfa_localevalue.cpp#newcode583 xfa/src/fxfa/src/parser/xfa_localevalue.cpp:583: FX_WORD wYear = 0, wMonth = 0, wDay = ...
5 years, 11 months ago (2015-01-06 22:30:39 UTC) #3
brucedawson
I changed them to float (FX_FLOAT is not available), which does make for a cleaner ...
5 years, 11 months ago (2015-01-07 21:14:45 UTC) #4
brucedawson
We could do that. However I noticed that the atoi code for wMonth and wDay ...
5 years, 11 months ago (2015-01-07 21:17:28 UTC) #5
brucedawson
Bo, what do you think? Would Tom have better insights into the relative costs of ...
5 years, 11 months ago (2015-01-08 18:16:54 UTC) #6
Bo Xu
On 2015/01/08 18:16:54, brucedawson wrote: > Bo, what do you think? Would Tom have better ...
5 years, 11 months ago (2015-01-08 18:23:54 UTC) #7
brucedawson
Tom/Lei, in merging my warning fixes to XFA I hit some double-to-float truncation warnings. These ...
5 years, 11 months ago (2015-01-08 18:30:22 UTC) #9
Bo Xu
https://codereview.chromium.org/834413002/diff/1/xfa/src/fxfa/src/parser/xfa_localevalue.cpp File xfa/src/fxfa/src/parser/xfa_localevalue.cpp (right): https://codereview.chromium.org/834413002/diff/1/xfa/src/fxfa/src/parser/xfa_localevalue.cpp#newcode584 xfa/src/fxfa/src/parser/xfa_localevalue.cpp:584: FX_LPCWSTR pDate = (FX_LPCWSTR)wsDate; This (FX_LPCWSTR) should be changed ...
5 years, 11 months ago (2015-01-08 18:36:24 UTC) #10
Tom Sepez
On 2015/01/08 18:30:22, brucedawson wrote: > Tom/Lei, in merging my warning fixes to XFA I ...
5 years, 11 months ago (2015-01-08 18:43:53 UTC) #11
Tom Sepez
https://codereview.chromium.org/834413002/diff/1/fpdfsdk/include/fsdk_mgr.h File fpdfsdk/include/fsdk_mgr.h (right): https://codereview.chromium.org/834413002/diff/1/fpdfsdk/include/fsdk_mgr.h#newcode480 fpdfsdk/include/fsdk_mgr.h:480: dstRect.top = static_cast<float>(top < bottom? bottom:top); nit: might as ...
5 years, 11 months ago (2015-01-08 18:47:50 UTC) #12
brucedawson
BTW, I should have clarified that the casts *were* in fsdk_mgr.h. The current version changes ...
5 years, 11 months ago (2015-01-08 18:54:47 UTC) #13
Tom Sepez
> Yes, it should be changed. My only question would be whether it is okay ...
5 years, 11 months ago (2015-01-08 18:57:57 UTC) #14
Bo Xu
LGTM https://codereview.chromium.org/834413002/diff/1/xfa/src/fxfa/src/parser/xfa_localevalue.cpp File xfa/src/fxfa/src/parser/xfa_localevalue.cpp (right): https://codereview.chromium.org/834413002/diff/1/xfa/src/fxfa/src/parser/xfa_localevalue.cpp#newcode584 xfa/src/fxfa/src/parser/xfa_localevalue.cpp:584: FX_LPCWSTR pDate = (FX_LPCWSTR)wsDate; On 2015/01/08 18:54:47, brucedawson ...
5 years, 11 months ago (2015-01-08 19:16:56 UTC) #15
brucedawson
5 years, 11 months ago (2015-01-08 19:47:54 UTC) #16
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
3f49aa3ba3e8ba2fcedc8e2e2a88f3b06efd52b9 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698