--- src/SDL_rotozoom.c.orig 2003-08-07 19:01:16.000000000 +0200 +++ src/SDL_rotozoom.c 2018-01-17 21:30:09.576536782 +0100 @@ -11,6 +11,7 @@ #endif #include "SDL_rotozoom.h" +#include "proto.h" #define MAX(a,b) (((a) > (b)) ? (a) : (b)) @@ -49,10 +50,10 @@ /* * Allocate memory for row increments */ - if ((sax = (int *) MyMalloc((dst->w + 1) * sizeof(Uint32))) == NULL) { + if ((sax = (int *)(intptr_t) MyMalloc((dst->w + 1) * sizeof(Uint32))) == (void*)0) { return (-1); } - if ((say = (int *) MyMalloc((dst->h + 1) * sizeof(Uint32))) == NULL) { + if ((say = (int *)(intptr_t) MyMalloc((dst->h + 1) * sizeof(Uint32))) == NULL) { free(sax); return (-1); } @@ -224,10 +225,10 @@ /* * Allocate memory for row increments */ - if ((sax = (Uint32 *) MyMalloc(dst->w * sizeof(Uint32))) == NULL) { + if ((sax = (Uint32 *)(uintptr_t) MyMalloc(dst->w * sizeof(Uint32))) == NULL) { return (-1); } - if ((say = (Uint32 *) MyMalloc(dst->h * sizeof(Uint32))) == NULL) { + if ((say = (Uint32 *)(uintptr_t) MyMalloc(dst->h * sizeof(Uint32))) == NULL) { if (sax != NULL) { free(sax); }