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

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

Issue 818363006: fix a few linux compilation warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Restore origina cmslut.c Created 5 years, 11 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 c4a0f88201a81db97599ac9aea9b1d7385585cdd..501a6845edca988995456fedf17b24d38af12738 100644
--- a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
@@ -314,6 +314,7 @@ void color_apply_icc_profile(opj_image_t *image)
{
cmsHPROFILE in_prof, out_prof;
cmsHTRANSFORM transform;
+ // TODO(tsepez): unused in_space seems suspicious.
cmsColorSpaceSignature in_space, out_space;
cmsUInt32Number intent, in_type, out_type, nr_samples;
int *r, *g, *b;
@@ -469,14 +470,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 =
@@ -673,7 +672,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) {
@@ -692,7 +690,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;
@@ -700,7 +697,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