From: Cameron Cawley <ccawley2011@gmail.com>
Date: Wed, 24 Apr 2019 20:20:15 +0100
Subject: Remove initial declaration from for loop

Origin: upstream, commit:https://github.com/libsdl-org/SDL-1.2/commit/51bb3400817c422715614c335e4740a8388c4662
---
 src/video/SDL_pixels.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/video/SDL_pixels.c b/src/video/SDL_pixels.c
index 44626b7..17f1a71 100644
--- a/src/video/SDL_pixels.c
+++ b/src/video/SDL_pixels.c
@@ -292,10 +292,11 @@ void SDL_DitherColors(SDL_Color *colors, int bpp)
 Uint16 SDL_CalculatePitch(SDL_Surface *surface)
 {
 	unsigned int pitch = 0;
+	Uint8 byte;
 
 	/* Surface should be 4-byte aligned for speed */
 	/* The code tries to prevent from an Uint16 overflow. */;
-	for (Uint8 byte = surface->format->BytesPerPixel; byte; byte--) {
+	for (byte = surface->format->BytesPerPixel; byte; byte--) {
 		pitch += (unsigned int)surface->w;
 		if (pitch < surface->w) {
 			SDL_SetError("A scanline is too wide");
