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

Unified Diff: core/src/fxcodec/codec/fx_codec_jpx_opj.cpp

Issue 1098583002: Fix a bunch of -Wunused-but-set-variable warnings. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
diff --git a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
index 3b0490f3c6f0fe7e052f368e1b39e6344c424399..c84f17049f903fca82aee5c3ee46b5eb8332c061 100644
--- a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
@@ -353,7 +353,7 @@ void color_apply_icc_profile(opj_image_t *image)
{
cmsHPROFILE in_prof, out_prof;
cmsHTRANSFORM transform;
- cmsColorSpaceSignature in_space, out_space;
+ cmsColorSpaceSignature out_space;
cmsUInt32Number intent, in_type, out_type, nr_samples;
int *r, *g, *b;
int prec, i, max, max_w, max_h;
@@ -363,7 +363,6 @@ void color_apply_icc_profile(opj_image_t *image)
if(in_prof == NULL) {
return;
}
- in_space = cmsGetPCS(in_prof);
out_space = cmsGetColorSpace(in_prof);
Tom Sepez 2015/04/17 16:20:16 nit: declaration of out_space can move here from l
Lei Zhang 2015/05/08 05:40:38 Done.
intent = cmsGetHeaderRenderingIntent(in_prof);
max_w = (int)image->comps[0].w;
@@ -508,14 +507,12 @@ void color_apply_conversion(opj_image_t *image)
int *L, *a, *b, *red, *green, *blue, *src0, *src1, *src2;
double rl, ol, ra, oa, rb, ob, prec0, prec1, prec2;
double minL, maxL, mina, maxa, minb, maxb;
- unsigned int default_type, il;
- unsigned int i, max, illu;
+ unsigned int default_type;
+ unsigned int i, max;
cmsHPROFILE in, out;
cmsHTRANSFORM transform;
cmsUInt16Number RGB[3];
cmsCIELab Lab;
- illu = 0;
- il = 0;
in = cmsCreateLab4Profile(NULL);
out = cmsCreate_sRGBProfile();
transform =
@@ -709,7 +706,6 @@ FX_BOOL CJPX_Decoder::Decode(FX_LPBYTE dest_buf, int pitch, FX_BOOL bTranslateCo
FX_BYTE** channel_bufs;
int* adjust_comps;
int i, wid, hei, row, col, channel, src;
- FX_BOOL flag;
FX_LPBYTE pChannel, pScanline, pPixel;
if(image->comps[0].w != image->x1 || image->comps[0].h != image->y1) {
@@ -728,7 +724,6 @@ FX_BOOL CJPX_Decoder::Decode(FX_LPBYTE dest_buf, int pitch, FX_BOOL bTranslateCo
FX_Free(channel_bufs);
return FALSE;
}
- flag = TRUE;
for (i = 0; i < (int)image->numcomps; i ++) {
channel_bufs[i] = dest_buf + offsets[i];
adjust_comps[i] = image->comps[i].prec - 8;
@@ -736,7 +731,6 @@ FX_BOOL CJPX_Decoder::Decode(FX_LPBYTE dest_buf, int pitch, FX_BOOL bTranslateCo
if(image->comps[i].dx != image->comps[i - 1].dx
|| image->comps[i].dy != image->comps[i - 1].dy
|| image->comps[i].prec != image->comps[i - 1].prec) {
- flag = FALSE;
goto failed;
}
}

Powered by Google App Engine
This is Rietveld 408576698