summaryrefslogtreecommitdiff
path: root/src/lib/openjp2/t1.c
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2017-09-19 12:46:20 +0200
committerEven Rouault <even.rouault@spatialys.com>2017-09-19 12:46:20 +0200
commitfdef69b43ce5222ac0f2a87f2fad1442ece340e8 (patch)
tree10efa6578035cc1f5fb6064bebac759d880c2c70 /src/lib/openjp2/t1.c
parent18f6696372f4c32334385f8dcc8d39ad8ac24601 (diff)
Fix warnings and errors when compiling with a c++ compiler (#1021)
Diffstat (limited to 'src/lib/openjp2/t1.c')
-rw-r--r--src/lib/openjp2/t1.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/openjp2/t1.c b/src/lib/openjp2/t1.c
index a583e692..e9699853 100644
--- a/src/lib/openjp2/t1.c
+++ b/src/lib/openjp2/t1.c
@@ -1065,6 +1065,7 @@ static void opj_t1_enc_clnpass_step(
for (ci = runlen; ci < lim; ++ci) {
OPJ_UINT32 vsc;
opj_flag_t flags;
+ OPJ_UINT32 ctxt1;
flags = *flagsp;
@@ -1073,7 +1074,7 @@ static void opj_t1_enc_clnpass_step(
}
if (!(flags & ((T1_SIGMA_THIS | T1_PI_THIS) << (ci * 3U)))) {
- OPJ_UINT32 ctxt1 = opj_t1_getctxno_zc(mqc, flags >> (ci * 3U));
+ ctxt1 = opj_t1_getctxno_zc(mqc, flags >> (ci * 3U));
#ifdef DEBUG_ENC_CLN
printf(" ctxt1=%d\n", ctxt1);
#endif
@@ -1617,7 +1618,8 @@ static void opj_t1_clbl_decode_processor(void* user_data, opj_tls_t* tls)
cblk_w = (OPJ_UINT32)(cblk->x1 - cblk->x0);
cblk_h = (OPJ_UINT32)(cblk->y1 - cblk->y0);
- cblk->decoded_data = opj_aligned_malloc(cblk_w * cblk_h * sizeof(OPJ_INT32));
+ cblk->decoded_data = (OPJ_INT32*)opj_aligned_malloc(cblk_w * cblk_h * sizeof(
+ OPJ_INT32));
if (cblk->decoded_data == NULL) {
if (job->p_manager_mutex) {
opj_mutex_lock(job->p_manager_mutex);