changeset 867:56e12109b936

Portability warning fixes.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 08 Jan 2015 03:49:56 +0200
parents 49fc8d8a0b9c
children 2c6b092328be
files src/dmengine.c src/dmgfx.c tools/auval.c tools/fontconv.c tools/gfxconv.c
diffstat 5 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/dmengine.c	Thu Jan 08 03:41:35 2015 +0200
+++ b/src/dmengine.c	Thu Jan 08 03:49:56 2015 +0200
@@ -452,7 +452,7 @@
                 engine->exitFlag = TRUE;
             else
             {
-                memcpy(stream, engine->audioRes->resData + engine->audioPos, len);
+                memcpy(stream, (Uint8 *) engine->audioRes->resData + engine->audioPos, len);
                 engine->audioPos += len;
             }
             break;
--- a/src/dmgfx.c	Thu Jan 08 03:41:35 2015 +0200
+++ b/src/dmgfx.c	Thu Jan 08 03:49:56 2015 +0200
@@ -25,7 +25,7 @@
     if (x1 > cx1) x1 = cx1;
     
     int x = x1 - x0 + 1;
-    Uint8 *pix = screen->pixels + yc * screen->pitch + (x0 * bpp);
+    Uint8 *pix = ((Uint8 *) screen->pixels) + yc * screen->pitch + (x0 * bpp);
     switch (screen->format->BitsPerPixel)
     {
         case 8:
@@ -58,7 +58,7 @@
     if (y1 > cy1) y1 = cy1;
 
     int y = y1 - y0 + 1;
-    Uint8 *pix = screen->pixels + y0 * screen->pitch + (xc * bpp);
+    Uint8 *pix = ((Uint8 *) screen->pixels) + y0 * screen->pitch + (xc * bpp);
     switch (screen->format->BitsPerPixel)
     {
         case 8:
--- a/tools/auval.c	Thu Jan 08 03:41:35 2015 +0200
+++ b/tools/auval.c	Thu Jan 08 03:49:56 2015 +0200
@@ -17,7 +17,7 @@
     REDRAW_VISUALIZER = 0x00000001,
     REDRAW_EDITOR     = 0x00000002,
     REDRAW_INFO       = 0x00000004,
-    REDRAW_ALL        = 0xffffffff,
+    REDRAW_ALL        = 0x0fffffff,
 };
 
 
--- a/tools/fontconv.c	Thu Jan 08 03:41:35 2015 +0200
+++ b/tools/fontconv.c	Thu Jan 08 03:49:56 2015 +0200
@@ -83,7 +83,7 @@
 
         case 4:
             {
-                int colR, colG, colB, colA = 100;
+                unsigned int colR, colG, colB, colA = 100;
                 if (optArg[0] == '#' || optArg[0] == '$') optArg++;
                 else
                 if (optArg[0] == '0' && optArg[1] == 'x') optArg += 2;
--- a/tools/gfxconv.c	Thu Jan 08 03:41:35 2015 +0200
+++ b/tools/gfxconv.c	Thu Jan 08 03:49:56 2015 +0200
@@ -331,7 +331,7 @@
     // Parse either a hex triplet color definition or a normal value
     if (*opt == '#' || *opt == '%')
     {
-        int colR, colG, colB, colA;
+        unsigned int colR, colG, colB, colA;
 
         if (sscanf(opt + 1, "%2x%2x%2x%2x", &colR, &colG, &colB, &colA) == 4 ||
             sscanf(opt + 1, "%2X%2X%2X%2X", &colR, &colG, &colB, &colA) == 4)