Fix warnings about possibly unused variable in TGA code

Just a minor fix after the changes of 0c939ae727 (Implement reading 16
and 32-bit color-mapped TGA images, 2020-12-11).

No real changes.
This commit is contained in:
Vadim Zeitlin
2021-01-10 19:03:19 +01:00
parent 4ed8ccff95
commit b980e2e859

View File

@@ -383,7 +383,7 @@ int ReadTGA(wxImage* image, wxInputStream& stream)
{
if ( alpha )
{
unsigned char a;
unsigned char a = 0;
Palette_GetRGBA(palette.get(), paletteLength,
imageData[index], &r, &g, &b, &a);
*dst++ = r;
@@ -590,7 +590,7 @@ int ReadTGA(wxImage* image, wxInputStream& stream)
{
if ( alpha )
{
unsigned char a;
unsigned char a = 0;
Palette_GetRGBA(palette.get(), paletteLength,
imageData[index], &r, &g, &b, &a);
*dst++ = r;