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,17 +71,16 @@ static int CompressAlpha(const uint8_t* data, size_t data_size,
|
|||||||
#endif /* WEBP_EXPERIMENTAL_FEATURES */
|
#endif /* WEBP_EXPERIMENTAL_FEATURES */
|
||||||
|
|
||||||
int VP8EncProcessAlpha(VP8Encoder* enc) {
|
int VP8EncProcessAlpha(VP8Encoder* enc) {
|
||||||
const WebPPicture* pic_ = enc->pic_;
|
|
||||||
enc->alpha_data_ = NULL;
|
enc->alpha_data_ = NULL;
|
||||||
enc->alpha_data_size_ = 0;
|
enc->alpha_data_size_ = 0;
|
||||||
#ifdef WEBP_EXPERIMENTAL_FEATURES
|
#ifdef WEBP_EXPERIMENTAL_FEATURES
|
||||||
if (pic_->a == NULL) {
|
if (enc->pic_->a) {
|
||||||
return 1;
|
const WebPPicture* pic = enc->pic_;
|
||||||
}
|
if (!CompressAlpha(pic->a, pic->width * pic->height,
|
||||||
if (!CompressAlpha(pic_->a, pic_->width * pic_->height,
|
&enc->alpha_data_, &enc->alpha_data_size_,
|
||||||
&enc->alpha_data_, &enc->alpha_data_size_,
|
enc->config_->alpha_compression)) {
|
||||||
enc->config_->alpha_compression)) {
|
return 0;
|
||||||
return 0;
|
}
|
||||||
}
|
}
|
||||||
#endif /* WEBP_EXPERIMENTAL_FEATURES */
|
#endif /* WEBP_EXPERIMENTAL_FEATURES */
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -176,6 +176,8 @@ static int WriteExtensions(VP8Encoder* const enc) {
|
|||||||
if (!VP8BitWriterAppend(bw, trailer, EXT_SIZE)) {
|
if (!VP8BitWriterAppend(bw, trailer, EXT_SIZE)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
(void)enc; // remove 'unused variable' warning
|
||||||
#endif
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user