Alexandre Julliard : gdi32: Use shorter constants for byte and word masks to avoid warnings.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Mar 4 09:22:16 CST 2015


Module: wine
Branch: master
Commit: 336be2f694b669b5c6d6168aa5f8c29d954b2be9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=336be2f694b669b5c6d6168aa5f8c29d954b2be9

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Mar  4 15:43:14 2015 +0900

gdi32: Use shorter constants for byte and word masks to avoid warnings.

---

 dlls/gdi32/dibdrv/primitives.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/gdi32/dibdrv/primitives.c b/dlls/gdi32/dibdrv/primitives.c
index 1569bc0..c7b48ed 100644
--- a/dlls/gdi32/dibdrv/primitives.c
+++ b/dlls/gdi32/dibdrv/primitives.c
@@ -6020,7 +6020,7 @@ static void shrink_row_24(const dib_info *dst_dib, const POINT *dst_start,
     else
     {
         struct rop_codes codes;
-        BYTE init_val = (mode == STRETCH_ANDSCANS) ? ~0u : 0u;
+        BYTE init_val = (mode == STRETCH_ANDSCANS) ? 0xff : 0;
         BOOL new_pix = TRUE;
 
         rop_codes_from_stretch_mode( mode, &codes );
@@ -6070,7 +6070,7 @@ static void shrink_row_16(const dib_info *dst_dib, const POINT *dst_start,
     else
     {
         struct rop_codes codes;
-        WORD init_val = (mode == STRETCH_ANDSCANS) ? ~0u : 0u;
+        WORD init_val = (mode == STRETCH_ANDSCANS) ? 0xffff : 0;
         BOOL new_pix = TRUE;
 
         rop_codes_from_stretch_mode( mode, &codes );
@@ -6118,7 +6118,7 @@ static void shrink_row_8(const dib_info *dst_dib, const POINT *dst_start,
     else
     {
         struct rop_codes codes;
-        BYTE init_val = (mode == STRETCH_ANDSCANS) ? ~0u : 0u;
+        BYTE init_val = (mode == STRETCH_ANDSCANS) ? 0xff : 0;
         BOOL new_pix = TRUE;
 
         rop_codes_from_stretch_mode( mode, &codes );
@@ -6149,7 +6149,7 @@ static void shrink_row_4(const dib_info *dst_dib, const POINT *dst_start,
     int err = params->err_start;
     int width, dst_x = dst_dib->rect.left + dst_start->x, src_x = src_dib->rect.left + src_start->x;
     struct rop_codes codes;
-    BYTE src_val, init_val = (mode == STRETCH_ANDSCANS) ? ~0u : 0u;
+    BYTE src_val, init_val = (mode == STRETCH_ANDSCANS) ? 0xff : 0;
     BOOL new_pix = TRUE;
 
     rop_codes_from_stretch_mode( mode, &codes );
@@ -6189,7 +6189,7 @@ static void shrink_row_1(const dib_info *dst_dib, const POINT *dst_start,
     int err = params->err_start;
     int width, dst_x = dst_dib->rect.left + dst_start->x, src_x = src_dib->rect.left + src_start->x;
     struct rop_codes codes;
-    BYTE src_val, init_val = (mode == STRETCH_ANDSCANS) ? ~0u : 0u;
+    BYTE src_val, init_val = (mode == STRETCH_ANDSCANS) ? 0xff : 0;
     BOOL new_pix = TRUE;
 
     rop_codes_from_stretch_mode( mode, &codes );




More information about the wine-cvs mailing list