diff options
author | Nico Weber <thakis@chromium.org> | 2014-07-29 10:13:17 -0700 |
---|---|---|
committer | Nico Weber <thakis@chromium.org> | 2014-07-29 10:13:17 -0700 |
commit | 6c55495fcaf634e7f788f4dfe77fa1a106c9cd55 (patch) | |
tree | 3fe8612d47f51ff551e480a2088a48349cd9bdf7 /core/src/fxcodec/codec | |
parent | c77e8f73397613f278eaeef2cae44debc6a684c8 (diff) | |
download | pdfium-6c55495fcaf634e7f788f4dfe77fa1a106c9cd55.tar.xz |
Fix a few more warnings in chromium_code mode.
No intended behavior change.
- Remove more unused variables, functions, member variables.
- Put a few constructor initializers in the order they execute in.
- Add braces for subobject initializers.
- Fix a handful of signed / unsigned comparisons.
BUG=pdfium:29
R=bo_xu@foxitsoftware.com
Review URL: https://codereview.chromium.org/429593005
Diffstat (limited to 'core/src/fxcodec/codec')
-rw-r--r-- | core/src/fxcodec/codec/fx_codec_jpeg.cpp | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/core/src/fxcodec/codec/fx_codec_jpeg.cpp b/core/src/fxcodec/codec/fx_codec_jpeg.cpp index 37399f8eb8..ac4be23e2c 100644 --- a/core/src/fxcodec/codec/fx_codec_jpeg.cpp +++ b/core/src/fxcodec/codec/fx_codec_jpeg.cpp @@ -82,59 +82,6 @@ static FX_BOOL _JpegIsIccMarker(jpeg_saved_marker_ptr marker) } return FALSE; } -static FX_BOOL _JpegLoadIccProfile(j_decompress_ptr cinfo, FX_LPBYTE* icc_buf_ptr, FX_DWORD* icc_length) -{ - if(icc_buf_ptr == NULL || icc_length == NULL) { - return FALSE; - } - *icc_buf_ptr = NULL; - *icc_length = 0; - FX_LPBYTE icc_data_ptr = NULL; - FX_DWORD icc_data_len = 0; - FX_BYTE count_icc_marker = 0; - FX_BYTE num_icc_marker = 0; - jpeg_saved_marker_ptr marker_list[256] = {NULL}; - for (jpeg_saved_marker_ptr cur_marker = cinfo->marker_list; - cur_marker != NULL; - cur_marker = cur_marker->next) { - if(_JpegIsIccMarker(cur_marker)) { - if(count_icc_marker == 0) { - num_icc_marker = cur_marker->data[13]; - } else if(num_icc_marker != cur_marker->data[13]) { - return FALSE; - } - int sn = cur_marker->data[12] - 1; - if(sn < 0 || sn >= num_icc_marker) { - return FALSE; - } - if(marker_list[sn] == NULL) { - marker_list[sn] = cur_marker; - } else { - return FALSE; - } - count_icc_marker ++; - icc_data_len += (cur_marker->data_length - JPEG_OVERHEAD_LEN); - } - } - if(count_icc_marker != num_icc_marker) { - return FALSE; - } - if(num_icc_marker == 0) { - return TRUE; - } - icc_data_ptr = FX_Alloc(FX_BYTE, icc_data_len); - if(icc_buf_ptr == NULL) { - return FALSE; - } - *icc_buf_ptr = icc_data_ptr; - *icc_length = icc_data_len; - for (int idx = 0; idx < num_icc_marker; idx++) { - icc_data_len = marker_list[idx]->data_length - JPEG_OVERHEAD_LEN; - FXSYS_memcpy32(icc_data_ptr, marker_list[idx]->data + JPEG_OVERHEAD_LEN, icc_data_len); - icc_data_ptr += icc_data_len; - } - return TRUE; -} static FX_BOOL _JpegEmbedIccProfile(j_compress_ptr cinfo, FX_LPCBYTE icc_buf_ptr, FX_DWORD icc_length) { if(icc_buf_ptr == NULL || icc_length == 0) { |