Fixed sign-compare warnings
authorArmin Novak <armin.novak@thincast.com>
Thu, 7 Feb 2019 13:19:59 +0000 (14:19 +0100)
committerArmin Novak <armin.novak@thincast.com>
Fri, 5 Apr 2019 07:13:24 +0000 (09:13 +0200)
libfreerdp/primitives/prim_alphaComp_opt.c
libfreerdp/primitives/prim_colors_opt.c
libfreerdp/primitives/test/TestPrimitivesColors.c

index 94daf27..5e1ca0e 100644 (file)
@@ -54,7 +54,8 @@ pstatus_t sse2_alphaComp_argb(
        const UINT32* sptr1 = (const UINT32*) pSrc1;
        const UINT32* sptr2 = (const UINT32*) pSrc2;
        UINT32* dptr;
-       int linebytes, src1Jump, src2Jump, dstJump, y;
+       int linebytes, src1Jump, src2Jump, dstJump;
+       UINT32 y;
        __m128i xmm0, xmm1;
 
        if ((width <= 0) || (height <= 0)) return PRIMITIVES_SUCCESS;
index a4f7240..c1d9fc2 100644 (file)
@@ -77,7 +77,8 @@ static pstatus_t sse2_yCbCrToRGB_16s16s_P3P3(
 {
        __m128i zero, max, r_cr, g_cb, g_cr, b_cb, c4096;
        __m128i* y_buf, *cb_buf, *cr_buf, *r_buf, *g_buf, *b_buf;
-       int srcbump, dstbump, yp, imax;
+       UINT32 yp;
+       int srcbump, dstbump, imax;
 
        if (((ULONG_PTR)(pSrc[0]) & 0x0f)
            || ((ULONG_PTR)(pSrc[1]) & 0x0f)
@@ -221,7 +222,7 @@ static pstatus_t sse2_yCbCrToRGB_16s8u_P3AC4R_BGRX(
        const UINT32 step = sizeof(__m128i) / sizeof(INT16);
        const UINT32 imax = (roi->width - pad) * sizeof(INT16) / sizeof(__m128i);
        BYTE* d_buf = pDst;
-       int yp;
+       UINT32 yp;
        const size_t dstPad = (dstStep - roi->width * 4);
 #ifdef DO_PREFETCH
 
@@ -410,7 +411,7 @@ static pstatus_t sse2_yCbCrToRGB_16s8u_P3AC4R_RGBX(
        const UINT32 step = sizeof(__m128i) / sizeof(INT16);
        const UINT32 imax = (roi->width - pad) * sizeof(INT16) / sizeof(__m128i);
        BYTE* d_buf = pDst;
-       int yp;
+       UINT32 yp;
        const size_t dstPad = (dstStep - roi->width * 4);
 #ifdef DO_PREFETCH
 
@@ -622,7 +623,8 @@ static pstatus_t sse2_RGBToYCbCr_16s16s_P3P3(
 {
        __m128i min, max, y_r, y_g, y_b, cb_r, cb_g, cb_b, cr_r, cr_g, cr_b;
        __m128i* r_buf, *g_buf, *b_buf, *y_buf, *cb_buf, *cr_buf;
-       int srcbump, dstbump, yp, imax;
+       UINT32 yp;
+       int srcbump, dstbump, imax;
 
        if (((ULONG_PTR)(pSrc[0]) & 0x0f)
            || ((ULONG_PTR)(pSrc[1]) & 0x0f)
index 94efee8..269c86c 100644 (file)
@@ -29,7 +29,7 @@ static BOOL test_RGBToRGB_16s8u_P3AC4R_func(prim_size_t roi, DWORD DstFormat)
        INT16* b;
        BYTE* out1;
        BYTE* out2;
-       int i;
+       UINT64 i;
        BOOL failed = FALSE;
        const INT16* ptrs[3];
        const UINT32 rgbStride = roi.width * 2;