fixed several warnings from Xcode 4 LLVM compiler; fixed bug #920
This commit is contained in:
2
3rdparty/libjasper/jas_debug.c
vendored
2
3rdparty/libjasper/jas_debug.c
vendored
@@ -125,7 +125,7 @@ int jas_memdump(FILE *out, void *data, size_t len)
|
||||
uchar *dp;
|
||||
dp = data;
|
||||
for (i = 0; i < len; i += 16) {
|
||||
fprintf(out, "%04x:", i);
|
||||
fprintf(out, "%04x:", (int)i);
|
||||
for (j = 0; j < 16; ++j) {
|
||||
if (i + j < len) {
|
||||
fprintf(out, " %02x", dp[i + j]);
|
||||
|
8
3rdparty/libjasper/jp2_cod.c
vendored
8
3rdparty/libjasper/jp2_cod.c
vendored
@@ -490,18 +490,18 @@ int jp2_box_put(jp2_box_t *box, jas_stream_t *out)
|
||||
box->len = jas_stream_tell(tmpstream) + JP2_BOX_HDRLEN(false);
|
||||
jas_stream_rewind(tmpstream);
|
||||
}
|
||||
extlen = (box->len >= (((uint_fast64_t)1) << 32)) != 0;
|
||||
if (jp2_putuint32(out, extlen ? 1 : box->len)) {
|
||||
//extlen = (box->len >= (((uint_fast64_t)1) << 32)) != 0;
|
||||
if (jp2_putuint32(out, /*extlen ? 1 :*/ box->len)) {
|
||||
goto error;
|
||||
}
|
||||
if (jp2_putuint32(out, box->type)) {
|
||||
goto error;
|
||||
}
|
||||
if (extlen) {
|
||||
/*if (extlen) {
|
||||
if (jp2_putuint64(out, box->len)) {
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
if (dataflag) {
|
||||
if (jas_stream_copy(out, tmpstream, box->len - JP2_BOX_HDRLEN(false))) {
|
||||
|
3
3rdparty/libjasper/jpc_cs.c
vendored
3
3rdparty/libjasper/jpc_cs.c
vendored
@@ -240,8 +240,7 @@ jpc_ms_t *jpc_getms(jas_stream_t *in, jpc_cstate_t *cstate)
|
||||
}
|
||||
|
||||
/* Get the marker type. */
|
||||
if (jpc_getuint16(in, &ms->id) || ms->id < JPC_MS_MIN ||
|
||||
ms->id > JPC_MS_MAX) {
|
||||
if (jpc_getuint16(in, &ms->id) || ms->id < JPC_MS_MIN /*|| ms->id > JPC_MS_MAX*/) {
|
||||
jpc_ms_destroy(ms);
|
||||
return 0;
|
||||
}
|
||||
|
6
3rdparty/libjasper/jpc_mqdec.c
vendored
6
3rdparty/libjasper/jpc_mqdec.c
vendored
@@ -300,7 +300,7 @@ void jpc_mqdec_dump(jpc_mqdec_t *mqdec, FILE *out)
|
||||
fprintf(out, "MQDEC A = %08lx, C = %08lx, CT=%08lx, ",
|
||||
(unsigned long) mqdec->areg, (unsigned long) mqdec->creg,
|
||||
(unsigned long) mqdec->ctreg);
|
||||
fprintf(out, "CTX = %d, ", mqdec->curctx - mqdec->ctxs);
|
||||
fprintf(out, "IND %d, MPS %d, QEVAL %x\n", *mqdec->curctx -
|
||||
jpc_mqstates, (*mqdec->curctx)->mps, (*mqdec->curctx)->qeval);
|
||||
fprintf(out, "CTX = %d, ", (int)(mqdec->curctx - mqdec->ctxs));
|
||||
fprintf(out, "IND %d, MPS %d, QEVAL %x\n", (int)(*mqdec->curctx -
|
||||
jpc_mqstates), (int)(*mqdec->curctx)->mps, (int)(*mqdec->curctx)->qeval);
|
||||
}
|
||||
|
4
3rdparty/libjasper/jpc_mqenc.c
vendored
4
3rdparty/libjasper/jpc_mqenc.c
vendored
@@ -386,7 +386,7 @@ int jpc_mqenc_dump(jpc_mqenc_t *mqenc, FILE *out)
|
||||
fprintf(out, "AREG = %08x, CREG = %08x, CTREG = %d\n",
|
||||
mqenc->areg, mqenc->creg, mqenc->ctreg);
|
||||
fprintf(out, "IND = %02d, MPS = %d, QEVAL = %04x\n",
|
||||
*mqenc->curctx - jpc_mqstates, (*mqenc->curctx)->mps,
|
||||
(*mqenc->curctx)->qeval);
|
||||
(int)(*mqenc->curctx - jpc_mqstates), (int)(*mqenc->curctx)->mps,
|
||||
(int)(*mqenc->curctx)->qeval);
|
||||
return 0;
|
||||
}
|
||||
|
2
3rdparty/libjasper/jpc_t2dec.c
vendored
2
3rdparty/libjasper/jpc_t2dec.c
vendored
@@ -574,7 +574,7 @@ long jpc_dec_lookahead(jas_stream_t *in)
|
||||
jas_stream_ungetc(in, x >> 8) == EOF) {
|
||||
return -1;
|
||||
}
|
||||
if (x >= JPC_MS_INMIN && x <= JPC_MS_INMAX) {
|
||||
if (x >= JPC_MS_INMIN /*&& x <= JPC_MS_INMAX*/) {
|
||||
return x;
|
||||
}
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user