From dc487bc51e78c50b2a16e2bab0b5c0d72367defb Mon Sep 17 00:00:00 2001
From: Kevin Colour <[EMAIL REDACTED]>
Date: Mon, 20 Jan 2025 16:53:05 -0800
Subject: [PATCH] Update SDL_gpu_textengine.c
fix: `error: declaration shadows a local variable [-Werror,-Wshadow]`
`AtlasGlyph *glyph;` is declared on line [623](https://github.com/libsdl-org/SDL_ttf/blob/db009130951541b4704c98e3ff4595dbced35dbe/src/SDL_gpu_textengine.c#L623) and then another variable with the same name is declared on line [633](https://github.com/libsdl-org/SDL_ttf/blob/db009130951541b4704c98e3ff4595dbced35dbe/src/SDL_gpu_textengine.c#L633).
Note: `AtlasGlyph *glyph;` is declared on line [623](https://github.com/libsdl-org/SDL_ttf/blob/db009130951541b4704c98e3ff4595dbced35dbe/src/SDL_gpu_textengine.c#L623) only because line [625](https://github.com/libsdl-org/SDL_ttf/blob/db009130951541b4704c98e3ff4595dbced35dbe/src/SDL_gpu_textengine.c#L625) uses it for sizeof in the malloc call.
---
src/SDL_gpu_textengine.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/SDL_gpu_textengine.c b/src/SDL_gpu_textengine.c
index 55056c79..e3601c4f 100644
--- a/src/SDL_gpu_textengine.c
+++ b/src/SDL_gpu_textengine.c
@@ -630,7 +630,7 @@ static AtlasDrawSequence *CreateDrawSequence(TTF_DrawOperation *ops, int num_ops
float *uv = (float *)sequence->uv;
for (int i = 0; i < count; ++i) {
- AtlasGlyph *glyph = (AtlasGlyph *)ops[i].copy.reserved;
+ glyph = (AtlasGlyph *)ops[i].copy.reserved;
SDL_memcpy(uv, glyph->texcoords, sizeof(glyph->texcoords));
uv += SDL_arraysize(glyph->texcoords);
}