# HG changeset patch # User Matti Hamalainen # Date 1420681796 -7200 # Node ID 56e12109b936e0951846091ba728758bd8335694 # Parent 49fc8d8a0b9c69b402a415bd5d8e43ecfa62b59a Portability warning fixes. diff -r 49fc8d8a0b9c -r 56e12109b936 src/dmengine.c --- 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; diff -r 49fc8d8a0b9c -r 56e12109b936 src/dmgfx.c --- 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: diff -r 49fc8d8a0b9c -r 56e12109b936 tools/auval.c --- 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, }; diff -r 49fc8d8a0b9c -r 56e12109b936 tools/fontconv.c --- 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; diff -r 49fc8d8a0b9c -r 56e12109b936 tools/gfxconv.c --- 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)