Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed compiler warning on some versions of GCC.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Aug 26, 2012
1 parent 537a34f commit 7bf0dd6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/video/SDL_surface.c
Expand Up @@ -912,6 +912,7 @@ int SDL_ConvertPixels(int width, int height,
SDL_PixelFormat src_fmt, dst_fmt;
SDL_BlitMap src_blitmap, dst_blitmap;
SDL_Rect rect;
void *nonconst_src = (void *) src;

/* Fast path for same format copy */
if (src_format == dst_format) {
Expand Down Expand Up @@ -942,7 +943,7 @@ int SDL_ConvertPixels(int width, int height,
return 0;
}

if (!SDL_CreateSurfaceOnStack(width, height, src_format, (void*)src,
if (!SDL_CreateSurfaceOnStack(width, height, src_format, nonconst_src,
src_pitch,
&src_surface, &src_fmt, &src_blitmap)) {
return -1;
Expand Down

0 comments on commit 7bf0dd6

Please sign in to comment.