Fixed compiler warning on Visual C++
authorSam Lantinga <slouken@libsdl.org>
Mon, 07 Mar 2011 14:07:08 -0800
changeset 54472a3cf6d7cac5
parent 5446 6ac8b0ac645e
child 5448 8090caeed230
Fixed compiler warning on Visual C++
src/video/SDL_pixels.c
     1.1 --- a/src/video/SDL_pixels.c	Mon Mar 07 14:06:46 2011 -0800
     1.2 +++ b/src/video/SDL_pixels.c	Mon Mar 07 14:07:08 2011 -0800
     1.3 @@ -816,7 +816,7 @@
     1.4          v = (pixel & format->Bmask) >> format->Bshift;
     1.5          *b = SDL_expand_byte[format->Bloss][v];
     1.6      } else {
     1.7 -        if (pixel < format->palette->ncolors) {
     1.8 +        if (pixel < (unsigned)format->palette->ncolors) {
     1.9              *r = format->palette->colors[pixel].r;
    1.10              *g = format->palette->colors[pixel].g;
    1.11              *b = format->palette->colors[pixel].b;
    1.12 @@ -841,7 +841,7 @@
    1.13          v = (pixel & format->Amask) >> format->Ashift;
    1.14          *a = SDL_expand_byte[format->Aloss][v];
    1.15      } else {
    1.16 -        if (pixel < format->palette->ncolors) {
    1.17 +        if (pixel < (unsigned)format->palette->ncolors) {
    1.18              *r = format->palette->colors[pixel].r;
    1.19              *g = format->palette->colors[pixel].g;
    1.20              *b = format->palette->colors[pixel].b;