Commit b5e9ebbafa7f4ad1e989448d8421028c37348135

Sam Lantinga 2019-06-08T19:12:05

Fixed compiler warning warning C4018: '<' : signed/unsigned mismatch

diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c
index faca9fe..9bf0d20 100644
--- a/src/render/SDL_render.c
+++ b/src/render/SDL_render.c
@@ -1222,14 +1222,14 @@ SDL_CreateTextureFromSurface(SDL_Renderer * renderer, SDL_Surface * surface)
     /* No alpha, but a colorkey => promote to alpha */
     if (!fmt->Amask && SDL_HasColorKey(surface)) {
         if (fmt->format == SDL_PIXELFORMAT_RGB888) {
-            for (i = 0; i < renderer->info.num_texture_formats; ++i) {
+            for (i = 0; i < (int)renderer->info.num_texture_formats; ++i) {
                 if (renderer->info.texture_formats[i] == SDL_PIXELFORMAT_ARGB8888) {
                     format = SDL_PIXELFORMAT_ARGB8888;
                     break;
                 }
             }
         } else if (fmt->format == SDL_PIXELFORMAT_BGR888) {
-            for (i = 0; i < renderer->info.num_texture_formats; ++i) {
+            for (i = 0; i < (int)renderer->info.num_texture_formats; ++i) {
                 if (renderer->info.texture_formats[i] == SDL_PIXELFORMAT_ABGR8888) {
                     format = SDL_PIXELFORMAT_ABGR8888;
                     break;
@@ -1238,7 +1238,7 @@ SDL_CreateTextureFromSurface(SDL_Renderer * renderer, SDL_Surface * surface)
         }
     } else {
         /* Exact match would be fine */
-        for (i = 0; i < renderer->info.num_texture_formats; ++i) {
+        for (i = 0; i < (int)renderer->info.num_texture_formats; ++i) {
             if (renderer->info.texture_formats[i] == fmt->format) {
                 format = fmt->format;
                 break;
@@ -1249,7 +1249,7 @@ SDL_CreateTextureFromSurface(SDL_Renderer * renderer, SDL_Surface * surface)
     /* Fallback, choose a valid pixel format */
     if (format == SDL_PIXELFORMAT_UNKNOWN) {
         format = renderer->info.texture_formats[0];
-        for (i = 0; i < renderer->info.num_texture_formats; ++i) {
+        for (i = 0; i < (int)renderer->info.num_texture_formats; ++i) {
             if (!SDL_ISPIXELFORMAT_FOURCC(renderer->info.texture_formats[i]) &&
                     SDL_ISPIXELFORMAT_ALPHA(renderer->info.texture_formats[i]) == needAlpha) {
                 format = renderer->info.texture_formats[i];