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

Issue 1634123004: War on #defines - part 2 (Closed)

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

Description

War on #defines - part 2 Introduce CPDF_Parser::Error. Introduce CPDF_Color::Type. Unused XFA_DATASETS and XFA_FORMS defines. Move FPDF_CreateStandardSecurityHandler() prototype to header. Delete prototype for nonexistent FPDF_CreatePubKeyHandler(). Make PBS_* defines local to .cpp file. Tidy whitespace. R=thestig@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/f10ae634e7b198b18942baaf9f111f07cc8ce818

Patch Set 1 #

Patch Set 2 : Missing break #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+155 lines, -195 lines) Patch
M core/include/fpdfapi/fpdf_parser.h View 6 chunks +25 lines, -72 lines 0 comments Download
M core/include/fpdfdoc/fpdf_ap.h View 3 chunks +8 lines, -13 lines 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp View 15 chunks +62 lines, -62 lines 0 comments Download
M core/src/fpdfdoc/doc_ap.cpp View 8 chunks +30 lines, -20 lines 0 comments Download
M fpdfsdk/include/fsdk_define.h View 1 chunk +1 line, -1 line 0 comments Download
M fpdfsdk/src/fpdf_dataavail.cpp View 1 chunk +8 lines, -7 lines 0 comments Download
M fpdfsdk/src/fpdfsave.cpp View 1 chunk +0 lines, -3 lines 0 comments Download
M fpdfsdk/src/fpdfview.cpp View 1 4 chunks +21 lines, -17 lines 5 comments Download

Messages

Total messages: 12 (6 generated)
Tom Sepez
Pls. review.
4 years, 11 months ago (2016-01-26 19:41:12 UTC) #5
Lei Zhang
lgtm https://codereview.chromium.org/1634123004/diff/20001/fpdfsdk/src/fpdfview.cpp File fpdfsdk/src/fpdfview.cpp (right): https://codereview.chromium.org/1634123004/diff/20001/fpdfsdk/src/fpdfview.cpp#newcode282 fpdfsdk/src/fpdfview.cpp:282: err_code = FPDF_ERR_SUCCESS; This is NOTREACHED(), BTW. https://codereview.chromium.org/1634123004/diff/20001/fpdfsdk/src/fpdfview.cpp#newcode414 ...
4 years, 11 months ago (2016-01-26 22:13:45 UTC) #6
Lei Zhang
On 2016/01/26 22:13:45, Lei Zhang wrote: > https://codereview.chromium.org/1634123004/diff/20001/fpdfsdk/src/fpdfview.cpp#newcode414 > fpdfsdk/src/fpdfview.cpp:414: CheckUnSupportError(pDoc, error); > BTW, all ...
4 years, 11 months ago (2016-01-26 22:14:05 UTC) #7
Tom Sepez
https://codereview.chromium.org/1634123004/diff/20001/fpdfsdk/src/fpdfview.cpp File fpdfsdk/src/fpdfview.cpp (right): https://codereview.chromium.org/1634123004/diff/20001/fpdfsdk/src/fpdfview.cpp#newcode282 fpdfsdk/src/fpdfview.cpp:282: err_code = FPDF_ERR_SUCCESS; On 2016/01/26 22:13:44, Lei Zhang wrote: ...
4 years, 11 months ago (2016-01-26 22:19:36 UTC) #8
Tom Sepez
Committed patchset #2 (id:20001) manually as f10ae634e7b198b18942baaf9f111f07cc8ce818 (presubmit successful).
4 years, 11 months ago (2016-01-26 22:19:56 UTC) #10
brucedawson
4 years, 10 months ago (2016-02-03 19:49:08 UTC) #12
Message was sent while issue was closed.
https://codereview.chromium.org/1634123004/diff/20001/fpdfsdk/src/fpdfview.cpp
File fpdfsdk/src/fpdfview.cpp (right):

https://codereview.chromium.org/1634123004/diff/20001/fpdfsdk/src/fpdfview.cp...
fpdfsdk/src/fpdfview.cpp:282: err_code = FPDF_ERR_SUCCESS;
On 2016/01/26 22:19:35, Tom Sepez wrote:
> On 2016/01/26 22:13:44, Lei Zhang wrote:
> > This is NOTREACHED(), BTW.
> 
> It exists just to satisfy the all enums handled by switch requirement.

Was clang giving a warning without this case? Arguably a default case would be
better because now VC++'s /analyze warns that err_code is potentially not
initialized. Ah, the joys of trying to write clean code while also keeping
multiple compilers warning clean.

Could also avoid the VC++ warning by initializing err_code to FPDF_ERR_SUCCESS.
Or just ignore.

Powered by Google App Engine
This is Rietveld 408576698