Skip to content

Commit

Permalink
Mark rowPointers as volatile to satisfy -Wclobbered
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Drago committed Mar 11, 2020
1 parent fe92047 commit ade6fe6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/shared/avifpng.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ avifBool avifPNGRead(avifImage * avif, const char * inputFilename, avifPixelForm
avifBool readResult = AVIF_FALSE;
png_structp png = NULL;
png_infop info = NULL;
png_bytep * rowPointers = NULL;
png_bytep * volatile rowPointers = NULL; // volatile avoids -Wclobbered due to libpng's setjmp

avifRGBImage rgb;
memset(&rgb, 0, sizeof(avifRGBImage));
Expand Down Expand Up @@ -139,7 +139,7 @@ avifBool avifPNGWrite(avifImage * avif, const char * outputFilename, int request
avifBool writeResult = AVIF_FALSE;
png_structp png = NULL;
png_infop info = NULL;
png_bytep * rowPointers = NULL;
png_bytep * volatile rowPointers = NULL; // volatile avoids -Wclobbered due to libpng's setjmp

avifRGBImage rgb;
memset(&rgb, 0, sizeof(avifRGBImage));
Expand Down

0 comments on commit ade6fe6

Please sign in to comment.