PNGdec: Initialise c to suppress warnings.

Compiler settings failed to fix this warning on GitHub actions, so
initialise the variable "c" where it's conditionally initialised
to fix the compiler being unable to detect it.
patch-pngdec-speed
Phil Howard 2024-03-26 14:01:05 +00:00
rodzic fca0bb076a
commit 173414e16c
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -256,6 +256,7 @@ PNG_STATIC void PNGRGB565(PNGDRAW *pDraw, uint16_t *pPixels, int iEndiannes, uin
}
break;
case 1:
c = 0; // PH: initialize C to suppress compiler warnings
for (x=0; x<pDraw->iWidth; x++) {
if ((x & 7) == 0) {
c = *s++;
@ -320,6 +321,7 @@ PNG_STATIC void PNGRGB565(PNGDRAW *pDraw, uint16_t *pPixels, int iEndiannes, uin
}
break;
case 1:
c = 0; // PH: initialize C to suppress compiler warnings
for (x=0; x<pDraw->iWidth; x++) {
if ((x & 7) == 0) {
c = *s++;
@ -397,6 +399,7 @@ PNG_STATIC void PNGRGB565(PNGDRAW *pDraw, uint16_t *pPixels, int iEndiannes, uin
}
break;
case 1:
c = 0; // PH: initialize C to suppress compiler warnings
for (x=0; x<pDraw->iWidth; x++) {
if ((x & 7) == 0) {
c = *s++;