SDL_image: IMG_bmp.c: fixed -Wunused-but-set-variable warnings.

From 454b30ccae57d879492d02cf7ac9fbb56fca2c51 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Fri, 27 May 2022 14:11:10 +0300
Subject: [PATCH] IMG_bmp.c: fixed -Wunused-but-set-variable warnings.

---
 IMG_bmp.c | 31 ++++++++++++++++++++-----------
 1 file changed, 20 insertions(+), 11 deletions(-)

diff --git a/IMG_bmp.c b/IMG_bmp.c
index 41e6f764..08833790 100644
--- a/IMG_bmp.c
+++ b/IMG_bmp.c
@@ -122,9 +122,11 @@ LoadICOCUR_RW(SDL_RWops * src, int type, int freesrc)
     int bmpPitch;
     int i,j, pad;
     SDL_Surface *surface;
+    /*
     Uint32 Rmask;
     Uint32 Gmask;
     Uint32 Bmask;
+    */
     Uint8 *bits;
     int ExpandBMP;
     int maxCol = 0;
@@ -140,14 +142,16 @@ LoadICOCUR_RW(SDL_RWops * src, int type, int freesrc)
     Uint32 biSize;
     Sint32 biWidth;
     Sint32 biHeight;
-    Uint16 biPlanes;
+    /* Uint16 biPlanes; */
     Uint16 biBitCount;
     Uint32 biCompression;
+    /*
     Uint32 biSizeImage;
     Sint32 biXPelsPerMeter;
     Sint32 biYPelsPerMeter;
-    Uint32 biClrUsed;
     Uint32 biClrImportant;
+    */
+    Uint32 biClrUsed;
 
     /* Make sure we are passed a valid data source */
     surface = NULL;
@@ -176,12 +180,14 @@ LoadICOCUR_RW(SDL_RWops * src, int type, int freesrc)
         int bWidth = SDL_Read8(src);    /* Uint8, but 0 = 256 ! */
         int bHeight = SDL_Read8(src);   /* Uint8, but 0 = 256 ! */
         int bColorCount = SDL_Read8(src);       /* Uint8, but 0 = 256 ! */
-        /* Uint8 bReserved;
+        /*
+        Uint8 bReserved;
         Uint16 wPlanes;
         Uint16 wBitCount;
-        Uint32 dwBytesInRes; */
+        Uint32 dwBytesInRes;
+        */
         Uint32 dwImageOffset;
-        
+
         /* bReserved = */ SDL_Read8(src);
         /* wPlanes = */ SDL_ReadLE16(src);
         /* wBitCount = */ SDL_ReadLE16(src);
@@ -215,14 +221,14 @@ LoadICOCUR_RW(SDL_RWops * src, int type, int freesrc)
     if (biSize == 40) {
         biWidth = SDL_ReadLE32(src);
         biHeight = SDL_ReadLE32(src);
-        biPlanes = SDL_ReadLE16(src);
+        /* biPlanes = */ SDL_ReadLE16(src);
         biBitCount = SDL_ReadLE16(src);
         biCompression = SDL_ReadLE32(src);
-        biSizeImage = SDL_ReadLE32(src);
-        biXPelsPerMeter = SDL_ReadLE32(src);
-        biYPelsPerMeter = SDL_ReadLE32(src);
+        /* biSizeImage = */ SDL_ReadLE32(src);
+        /* biXPelsPerMeter = */ SDL_ReadLE32(src);
+        /* biYPelsPerMeter = */ SDL_ReadLE32(src);
         biClrUsed = SDL_ReadLE32(src);
-        biClrImportant = SDL_ReadLE32(src);
+        /* biClrImportant = */ SDL_ReadLE32(src);
     } else {
         IMG_SetError("Unsupported ICO bitmap format");
         was_error = SDL_TRUE;
@@ -252,9 +258,11 @@ LoadICOCUR_RW(SDL_RWops * src, int type, int freesrc)
             ExpandBMP = 24;
             break;
         case 32:
+            /*
             Rmask = 0x00FF0000;
             Gmask = 0x0000FF00;
             Bmask = 0x000000FF;
+            */
             ExpandBMP = 0;
             break;
         default:
@@ -357,7 +365,7 @@ LoadICOCUR_RW(SDL_RWops * src, int type, int freesrc)
                 for (i = 0; i < surface->w; ++i) {
                     pixel = 0;
                     for (j = 0; j < 3; ++j) {
-                        //Load each color channel into pixel
+                        /* Load each color channel into pixel */
                         if (!SDL_RWread(src, &channel, 1, 1)) {
                             IMG_SetError("Error reading from ICO");
                             was_error = SDL_TRUE;
@@ -451,6 +459,7 @@ SDL_Surface *IMG_LoadCUR_RW(SDL_RWops *src)
 }
 
 #else
+
 #if _MSC_VER >= 1300
 #pragma warning(disable : 4100) /* warning C4100: 'op' : unreferenced formal parameter */
 #endif