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

Issue 792953005: Resolve all but two VC++ build warnings in pdfium. (Closed)

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

Description

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

Patch Set 1 #

Patch Set 2 : Only do warnings-as-errors on 32-bit builds. #

Total comments: 4

Patch Set 3 : Disabling WarnAsError for fxcodec library. #

Total comments: 1

Patch Set 4 : Fixing formatting. #

Total comments: 5

Patch Set 5 : Link to warning bugs, and globally suppress 4996 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -5 lines) Patch
M build/standalone.gypi View 1 2 3 4 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 pdfium.gyp View 1 2 3 4 1 chunk +7 lines, -0 lines 1 comment Download

Messages

Total messages: 20 (4 generated)
brucedawson
Any comments on this change? In particular, do the two remaining warnings point out a ...
5 years, 11 months ago (2015-01-02 23:20:38 UTC) #2
brucedawson
The 64-bit build has a number of __int64 to int32_t truncation warnings, from icu and ...
5 years, 11 months ago (2015-01-02 23:48:56 UTC) #3
Bo Xu
On 2015/01/02 23:48:56, brucedawson wrote: > The 64-bit build has a number of __int64 to ...
5 years, 11 months ago (2015-01-03 00:00:18 UTC) #4
brucedawson
Any word? The two remaining warnings can either be suppressed with a cast, fixed (whatever ...
5 years, 11 months ago (2015-01-05 22:41:13 UTC) #5
Bo Xu
On 2015/01/05 22:41:13, brucedawson wrote: > Any word? > > The two remaining warnings can ...
5 years, 11 months ago (2015-01-05 22:50:45 UTC) #6
Tom Sepez
lgtm https://codereview.chromium.org/792953005/diff/20001/build/standalone.gypi File build/standalone.gypi (right): https://codereview.chromium.org/792953005/diff/20001/build/standalone.gypi#newcode188 build/standalone.gypi:188: 'WarnAsError': 'false', nit: indent +4 ? Strange, I ...
5 years, 11 months ago (2015-01-05 23:02:57 UTC) #8
brucedawson
Take a look Scott? https://codereview.chromium.org/792953005/diff/20001/build/standalone.gypi File build/standalone.gypi (right): https://codereview.chromium.org/792953005/diff/20001/build/standalone.gypi#newcode188 build/standalone.gypi:188: 'WarnAsError': 'false', There's a sort ...
5 years, 11 months ago (2015-01-06 18:03:32 UTC) #10
scottmg
lgtm https://codereview.chromium.org/792953005/diff/60001/build/standalone.gypi File build/standalone.gypi (right): https://codereview.chromium.org/792953005/diff/60001/build/standalone.gypi#newcode188 build/standalone.gypi:188: 'WarnAsError': 'false', This deserves a comment and a ...
5 years, 11 months ago (2015-01-06 19:48:53 UTC) #11
brucedawson
Thanks for the feedback. All issues addressed. I will land now. https://codereview.chromium.org/792953005/diff/60001/build/standalone.gypi File build/standalone.gypi (right): ...
5 years, 11 months ago (2015-01-06 21:01:18 UTC) #12
brucedawson
Committed patchset #5 (id:80001) manually as d12a4f465a0bcc8b233079ccd54bf7882f3532d5 (presubmit successful).
5 years, 11 months ago (2015-01-06 21:12:14 UTC) #13
Nico
https://codereview.chromium.org/792953005/diff/80001/pdfium.gyp File pdfium.gyp (right): https://codereview.chromium.org/792953005/diff/80001/pdfium.gyp#newcode315 pdfium.gyp:315: 'WarnAsError': 'false', Please don't add WarnAsError: false anywhere, ever. ...
5 years, 6 months ago (2015-06-09 15:51:39 UTC) #15
Tom Sepez
> Is this still needed? A build of Chromium seems to still be warning-free, and ...
5 years, 6 months ago (2015-06-09 16:01:22 UTC) #16
Tom Sepez
On 2015/06/09 16:01:22, Tom Sepez wrote: > > Is this still needed? A build of ...
5 years, 6 months ago (2015-06-09 16:02:59 UTC) #17
Tom Sepez
On 2015/06/09 16:02:59, Tom Sepez wrote: > On 2015/06/09 16:01:22, Tom Sepez wrote: > > ...
5 years, 6 months ago (2015-06-09 16:05:16 UTC) #18
Nico
It's still suboptimal since people copy-paste these files around. The flag has been there for ...
5 years, 6 months ago (2015-06-09 16:16:12 UTC) #19
brucedawson
5 years, 6 months ago (2015-06-09 17:10:57 UTC) #20
Message was sent while issue was closed.
That seems reasonable. We should fix the warnings now, or turn them off.

Worst-case, we can suppress the warnings, enable warnings-as-errors, and we'll
be slightly better off than we are now, and we'll have the bugs to remind us to
re-enable the warnings and fix them later.

Powered by Google App Engine
This is Rietveld 408576698