Fixed compiler warnings for Windows builds.

Added -Werror to Windows makefiles.
This commit is contained in:
SarahW 2017-04-11 19:34:41 +01:00
commit 2b892d2a7a
168 changed files with 1927 additions and 1963 deletions

View file

@ -172,7 +172,7 @@ static void ddraw_blit_memtoscreen(int x, int y, int y1, int y2, int w, int h)
for (yy = y1; yy < y2; yy++)
{
if ((y + yy) >= 0 && (y + yy) < buffer->h)
memcpy(ddsd.lpSurface + (yy * ddsd.lPitch), &(((uint32_t *)buffer32->line[y + yy])[x]), w * 4);
memcpy((void *)((uintptr_t)ddsd.lpSurface + (yy * ddsd.lPitch)), &(((uint32_t *)buffer32->line[y + yy])[x]), w * 4);
}
video_blit_complete();
lpdds_back->Unlock(NULL);
@ -208,7 +208,7 @@ static void ddraw_blit_memtoscreen(int x, int y, int y1, int y2, int w, int h)
if (!ddsd.lpSurface) return;
for (yy = 8; yy < 14; yy++)
{
p = (uint32_t *)(ddsd.lpSurface + (yy * ddsd.lPitch));
p = (uint32_t *)((uintptr_t)ddsd.lpSurface + (yy * ddsd.lPitch));
for (xx = (w - 40); xx < (w - 8); xx++)
p[xx] = 0xffffffff;
}
@ -253,12 +253,12 @@ static void ddraw_blit_memtoscreen_8(int x, int y, int w, int h)
{
if ((y + yy) >= 0 && (y + yy) < buffer->h)
{
p = (uint32_t *)(ddsd.lpSurface + (yy * ddsd.lPitch));
p = (uint32_t *)((uintptr_t)ddsd.lpSurface + (yy * ddsd.lPitch));
for (xx = 0; xx < w; xx++)
p[xx] = pal_lookup[buffer->line[y + yy][x + xx]];
}
}
p = (uint32_t *)(ddsd.lpSurface + (4 * ddsd.lPitch));
p = (uint32_t *)((uintptr_t)ddsd.lpSurface + (4 * ddsd.lPitch));
lpdds_back->Unlock(NULL);
video_blit_complete();
@ -293,7 +293,7 @@ static void ddraw_blit_memtoscreen_8(int x, int y, int w, int h)
if (!ddsd.lpSurface) return;
for (yy = 8; yy < 14; yy++)
{
p = (uint32_t *)(ddsd.lpSurface + (yy * ddsd.lPitch));
p = (uint32_t *)((uintptr_t)ddsd.lpSurface + (yy * ddsd.lPitch));
for (xx = (w - 40); xx < (w - 8); xx++)
p[xx] = 0xffffffff;
}