mirror of
https://github.com/webmproject/libwebp.git
synced 2025-02-13 15:32:53 +01:00
fix some 'unused variable' warning
Change-Id: I1d2747480675b68f57d7ef7bf0b0010d267cb32b
This commit is contained in:
parent
fb29c26201
commit
cdef89de0e
@ -71,18 +71,17 @@ static int CompressAlpha(const uint8_t* data, size_t data_size,
|
||||
#endif /* WEBP_EXPERIMENTAL_FEATURES */
|
||||
|
||||
int VP8EncProcessAlpha(VP8Encoder* enc) {
|
||||
const WebPPicture* pic_ = enc->pic_;
|
||||
enc->alpha_data_ = NULL;
|
||||
enc->alpha_data_size_ = 0;
|
||||
#ifdef WEBP_EXPERIMENTAL_FEATURES
|
||||
if (pic_->a == NULL) {
|
||||
return 1;
|
||||
}
|
||||
if (!CompressAlpha(pic_->a, pic_->width * pic_->height,
|
||||
if (enc->pic_->a) {
|
||||
const WebPPicture* pic = enc->pic_;
|
||||
if (!CompressAlpha(pic->a, pic->width * pic->height,
|
||||
&enc->alpha_data_, &enc->alpha_data_size_,
|
||||
enc->config_->alpha_compression)) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif /* WEBP_EXPERIMENTAL_FEATURES */
|
||||
return 1;
|
||||
}
|
||||
|
@ -176,6 +176,8 @@ static int WriteExtensions(VP8Encoder* const enc) {
|
||||
if (!VP8BitWriterAppend(bw, trailer, EXT_SIZE)) {
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
(void)enc; // remove 'unused variable' warning
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user