summaryrefslogtreecommitdiff
path: root/src/bin/jp2/convertpng.c
diff options
context:
space:
mode:
authormayeut <mayeut@users.noreply.github.com>2015-07-26 02:41:39 +0200
committermayeut <mayeut@users.noreply.github.com>2015-07-26 02:41:39 +0200
commitc423cc84e7be79051a7f9631fa26aa7d072361f2 (patch)
tree98d92f8501df77e5510c69eb4db6f1fab20b9855 /src/bin/jp2/convertpng.c
parentd87de3a88da9a405a06e8d1e3b3d5d8b3e935ba2 (diff)
Remove some warnings when building
Update #442
Diffstat (limited to 'src/bin/jp2/convertpng.c')
-rw-r--r--src/bin/jp2/convertpng.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/jp2/convertpng.c b/src/bin/jp2/convertpng.c
index 5fe6dccc..f962f696 100644
--- a/src/bin/jp2/convertpng.c
+++ b/src/bin/jp2/convertpng.c
@@ -102,7 +102,7 @@ typedef void (* convert_XXx32s_C1R)(const OPJ_BYTE* pSrc, OPJ_INT32* pDst, OPJ_S
static void convert_1u32s_C1R(const OPJ_BYTE* pSrc, OPJ_INT32* pDst, OPJ_SIZE_T length)
{
OPJ_SIZE_T i;
- for (i = 0; i < (length & -(OPJ_SIZE_T)8U); i+=8U) {
+ for (i = 0; i < (length & ~(OPJ_SIZE_T)7U); i+=8U) {
OPJ_UINT32 val = *pSrc++;
pDst[i+0] = (OPJ_INT32)( val >> 7);
pDst[i+1] = (OPJ_INT32)((val >> 6) & 0x1U);
@@ -141,7 +141,7 @@ static void convert_1u32s_C1R(const OPJ_BYTE* pSrc, OPJ_INT32* pDst, OPJ_SIZE_T
static void convert_2u32s_C1R(const OPJ_BYTE* pSrc, OPJ_INT32* pDst, OPJ_SIZE_T length)
{
OPJ_SIZE_T i;
- for (i = 0; i < (length & -(OPJ_SIZE_T)4U); i+=4U) {
+ for (i = 0; i < (length & ~(OPJ_SIZE_T)3U); i+=4U) {
OPJ_UINT32 val = *pSrc++;
pDst[i+0] = (OPJ_INT32)( val >> 6);
pDst[i+1] = (OPJ_INT32)((val >> 4) & 0x3U);
@@ -165,7 +165,7 @@ static void convert_2u32s_C1R(const OPJ_BYTE* pSrc, OPJ_INT32* pDst, OPJ_SIZE_T
static void convert_4u32s_C1R(const OPJ_BYTE* pSrc, OPJ_INT32* pDst, OPJ_SIZE_T length)
{
OPJ_SIZE_T i;
- for (i = 0; i < (length & -(OPJ_SIZE_T)2U); i+=2U) {
+ for (i = 0; i < (length & ~(OPJ_SIZE_T)1U); i+=2U) {
OPJ_UINT32 val = *pSrc++;
pDst[i+0] = (OPJ_INT32)(val >> 4);
pDst[i+1] = (OPJ_INT32)(val & 0xFU);