]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - plugins/image/jpeg.cpp
Remove most of the compiler warning in radiant
[xonotic/netradiant.git] / plugins / image / jpeg.cpp
index 138151a2f62c81de5270f9188ff211d53c59a745..31685fd86fda5feb8f0f3dc10291c25e4ed33ede 100644 (file)
@@ -297,13 +297,12 @@ static void j_putRGBAScanline( unsigned char* jpegline, int widthPix, unsigned c
 
        for ( count = 0; count < widthPix; count++ )
        {
-               unsigned char iRed, iBlu, iGrn, iAlp;
+               unsigned char iRed, iBlu, iGrn;
                unsigned char *oRed, *oBlu, *oGrn, *oAlp;
 
                iRed = *( jpegline + count * 4 + 0 );
                iGrn = *( jpegline + count * 4 + 1 );
                iBlu = *( jpegline + count * 4 + 2 );
-               iAlp = *( jpegline + count * 4 + 3 );
 
                oRed = outBuf + offset + count * 4 + 0;
                oGrn = outBuf + offset + count * 4 + 1;
@@ -318,7 +317,7 @@ static void j_putRGBAScanline( unsigned char* jpegline, int widthPix, unsigned c
 #if 1
                *oAlp = 255;
 #else
-               *oAlp = iAlp;
+               *oAlp = *( jpegline + count * 4 + 3 );
 #endif
        }
 }