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

Issue 1801383002: Re-enable several MSVC warnings (Closed)

Created:
4 years, 9 months ago by Wei Li
Modified:
4 years, 9 months ago
Reviewers:
Tom Sepez, dsinclair
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Project:
pdfium
Visibility:
Public.

Description

Re-enable several MSVC warnings Re-enable the following warnings: 4245: signed/unsigned conversion mismatch; 4310: cast may truncate data; 4389: operator on signed/unsigned mismatch; 4701: use potentially uninitialized local variable; 4706: assignment within conditional expression Clean up the code to avoid those warnings. BUG=pdfium:29 R=tsepez@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/d4e8f1222ca17b57ac74019b2fc3706e1192645c

Patch Set 1 : #

Total comments: 85

Patch Set 2 : address comments #

Patch Set 3 : address more comments #

Patch Set 4 : address more comments #

Total comments: 14

Patch Set 5 : more comments #

Patch Set 6 : rebase #

Patch Set 7 : rebase again #

Unified diffs Side-by-side diffs Delta from patch set Stats (+279 lines, -307 lines) Patch
M core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M core/fpdfapi/fpdf_font/fpdf_font_cid.cpp View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M core/fpdfapi/fpdf_page/cpdf_page.cpp View 1 2 3 4 5 1 chunk +6 lines, -1 line 0 comments Download
M core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp View 1 2 3 4 5 4 chunks +7 lines, -7 lines 0 comments Download
M core/fpdfapi/fpdf_parser/cpdf_parser.cpp View 1 chunk +2 lines, -3 lines 0 comments Download
M core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp View 2 chunks +3 lines, -3 lines 0 comments Download
M core/fpdfapi/fpdf_render/fpdf_render_text.cpp View 1 2 3 4 5 2 chunks +4 lines, -5 lines 0 comments Download
M core/fpdfdoc/doc_ap.cpp View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M core/fxcodec/codec/codec_int.h View 1 chunk +0 lines, -1 line 0 comments Download
M core/fxcodec/codec/fx_codec_flate.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M core/fxcodec/codec/fx_codec_jpx_opj.cpp View 1 2 4 chunks +10 lines, -6 lines 0 comments Download
M core/fxcodec/codec/fx_codec_tiff.cpp View 2 1 chunk +3 lines, -3 lines 0 comments Download
M core/fxcodec/jbig2/JBig2_Context.cpp View 2 chunks +9 lines, -9 lines 0 comments Download
M core/fxcodec/jbig2/JBig2_Image.cpp View 1 2 3 4 12 chunks +89 lines, -106 lines 0 comments Download
M core/fxcodec/jbig2/JBig2_TrdProc.cpp View 1 2 7 chunks +32 lines, -37 lines 0 comments Download
M core/fxcrt/fx_basic_maps.cpp View 1 2 3 4 1 chunk +6 lines, -9 lines 0 comments Download
M core/fxcrt/fx_basic_wstring.cpp View 1 2 3 4 2 chunks +10 lines, -10 lines 0 comments Download
M core/fxge/dib/fx_dib_composite.cpp View 18 chunks +47 lines, -77 lines 0 comments Download
M core/fxge/dib/fx_dib_main.cpp View 1 2 1 chunk +19 lines, -2 lines 0 comments Download
M core/fxge/ge/fx_ge_font.cpp View 2 1 chunk +1 line, -1 line 0 comments Download
M core/fxge/ge/fx_ge_path.cpp View 1 chunk +3 lines, -1 line 0 comments Download
M core/fxge/ge/fx_ge_text.cpp View 1 chunk +4 lines, -1 line 0 comments Download
M core/fxge/win32/fx_win32_gdipext.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M fpdfsdk/formfiller/cba_fontmap.cpp View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M fpdfsdk/fpdfppo.cpp View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M fpdfsdk/fpdftext.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M fpdfsdk/fpdfview.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M fpdfsdk/fxedit/fxet_ap.cpp View 1 2 1 chunk +4 lines, -6 lines 0 comments Download
M fpdfsdk/javascript/Document.cpp View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M pdfium.gyp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 16 (6 generated)
Wei Li
PTAL, thanks
4 years, 9 months ago (2016-03-15 23:45:43 UTC) #3
dsinclair
https://codereview.chromium.org/1801383002/diff/20001/core/fpdfdoc/doc_ap.cpp File core/fpdfdoc/doc_ap.cpp (right): https://codereview.chromium.org/1801383002/diff/20001/core/fpdfdoc/doc_ap.cpp#newcode307 core/fpdfdoc/doc_ap.cpp:307: if (pDRDict && (pDRFontDict = pDRDict->GetDictBy("Font")) != nullptr) { ...
4 years, 9 months ago (2016-03-16 13:23:32 UTC) #5
Wei Li
thanks https://codereview.chromium.org/1801383002/diff/20001/core/fpdfdoc/doc_ap.cpp File core/fpdfdoc/doc_ap.cpp (right): https://codereview.chromium.org/1801383002/diff/20001/core/fpdfdoc/doc_ap.cpp#newcode307 core/fpdfdoc/doc_ap.cpp:307: if (pDRDict && (pDRFontDict = pDRDict->GetDictBy("Font")) != nullptr) ...
4 years, 9 months ago (2016-03-16 17:51:32 UTC) #6
Tom Sepez
Can you split out all the ones that I raised big questions on to another ...
4 years, 9 months ago (2016-03-16 18:35:00 UTC) #7
Tom Sepez
Also, we may want to live with 4706, doing if ((x = foo)) {} gets ...
4 years, 9 months ago (2016-03-16 18:37:50 UTC) #8
Wei Li
Thank you for the review. https://codereview.chromium.org/1801383002/diff/20001/core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp File core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp (right): https://codereview.chromium.org/1801383002/diff/20001/core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp#newcode939 core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp:939: ordering = "GB1", supplement ...
4 years, 9 months ago (2016-03-17 02:24:06 UTC) #11
Tom Sepez
Getting much better. https://codereview.chromium.org/1801383002/diff/20001/core/fpdfapi/fpdf_render/fpdf_render_text.cpp File core/fpdfapi/fpdf_render/fpdf_render_text.cpp (right): https://codereview.chromium.org/1801383002/diff/20001/core/fpdfapi/fpdf_render/fpdf_render_text.cpp#newcode140 core/fpdfapi/fpdf_render/fpdf_render_text.cpp:140: if (FXSYS_fabs(image_matrix.b) < FXSYS_fabs(image_matrix.a) / 100 ...
4 years, 9 months ago (2016-03-17 16:40:06 UTC) #12
Wei Li
Thanks for the review. https://codereview.chromium.org/1801383002/diff/120001/core/fxcodec/jbig2/JBig2_Image.cpp File core/fxcodec/jbig2/JBig2_Image.cpp (right): https://codereview.chromium.org/1801383002/diff/120001/core/fxcodec/jbig2/JBig2_Image.cpp#newcode671 core/fxcodec/jbig2/JBig2_Image.cpp:671: if (x < -1048576 || ...
4 years, 9 months ago (2016-03-18 17:42:39 UTC) #13
Tom Sepez
lgtm
4 years, 9 months ago (2016-03-18 20:36:34 UTC) #14
Wei Li
4 years, 9 months ago (2016-03-21 18:20:53 UTC) #16
Message was sent while issue was closed.
Committed patchset #7 (id:180001) manually as
d4e8f1222ca17b57ac74019b2fc3706e1192645c (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698