summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormayeut <mayeut@users.noreply.github.com>2015-09-23 21:09:19 +0200
committermayeut <mayeut@users.noreply.github.com>2015-09-23 21:09:19 +0200
commitfaf63fddad6efab9fa4dcb14cd290766722a7eec (patch)
tree9dd320c32df46ceb40b0973fbce968389395278d /src
parent281537851b369e51bdaa8445014998c6b86c962b (diff)
Fix warning in rle4 decoding
Diffstat (limited to 'src')
-rw-r--r--src/bin/jp2/convertbmp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/jp2/convertbmp.c b/src/bin/jp2/convertbmp.c
index 1131a599..0678d9d3 100644
--- a/src/bin/jp2/convertbmp.c
+++ b/src/bin/jp2/convertbmp.c
@@ -572,7 +572,7 @@ static OPJ_BOOL bmp_read_rle4_data(FILE* IN, OPJ_UINT8* pData, OPJ_UINT32 stride
OPJ_UINT8 c1 = (OPJ_UINT8)getc(IN);
for (j = 0; (j < c) && (x < width) && ((OPJ_SIZE_T)pix < (OPJ_SIZE_T)beyond); j++, x++, pix++) {
- *pix = (j&1) ? (c1 & 0x0f) : ((c1>>4)&0x0f);
+ *pix = (OPJ_UINT8)((j&1) ? (c1 & 0x0fU) : ((c1>>4)&0x0fU));
}
}
else { /* absolute mode */
@@ -598,7 +598,7 @@ static OPJ_BOOL bmp_read_rle4_data(FILE* IN, OPJ_UINT8* pData, OPJ_UINT32 stride
if((j&1) == 0) {
c1 = (OPJ_UINT8)getc(IN);
}
- *pix = (j&1) ? (c1 & 0x0f) : ((c1>>4)&0x0f);
+ *pix = (OPJ_UINT8)((j&1) ? (c1 & 0x0fU) : ((c1>>4)&0x0fU));
}
if(((c&3) == 1) || ((c&3) == 2)) { /* skip padding byte */
getc(IN);