Skip to content

Commit

Permalink
apps:avifpng: Remove unused variable hasAlpha (#109)
Browse files Browse the repository at this point in the history
apps/shared/avifpng.c: In function 'avifPNGRead':
apps/shared/avifpng.c:80:14: error: variable 'hasAlpha' set but not used [-Werror=unused-but-set-variable]
    avifBool hasAlpha = AVIF_FALSE;
             ^~~~~~~~

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
  • Loading branch information
cryptomilk authored Mar 11, 2020
1 parent 39cf076 commit 7db1d05
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions apps/shared/avifpng.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,8 @@ avifBool avifPNGRead(avifImage * avif, const char * inputFilename, avifPixelForm
png_set_expand_gray_1_2_4_to_8(png);
}

avifBool hasAlpha = AVIF_FALSE;
if (png_get_valid(png, info, PNG_INFO_tRNS)) {
png_set_tRNS_to_alpha(png);
hasAlpha = AVIF_TRUE;
}

if ((rawColorType == PNG_COLOR_TYPE_RGB) || (rawColorType == PNG_COLOR_TYPE_GRAY) || (rawColorType == PNG_COLOR_TYPE_PALETTE)) {
Expand Down

0 comments on commit 7db1d05

Please sign in to comment.