mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-27 11:20:02 +02:00
Add a WEBP_NODISCARD
Change-Id: Ice66f2aa6358474d728fb19c571edc86ed139a49
This commit is contained in:
@ -20,6 +20,7 @@
|
||||
#include "src/utils/filters_utils.h"
|
||||
#include "src/utils/quant_levels_utils.h"
|
||||
#include "src/utils/utils.h"
|
||||
#include "src/webp/encode.h"
|
||||
#include "src/webp/format_constants.h"
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@ -66,7 +67,7 @@ static int EncodeLossless(const uint8_t* const data, int width, int height,
|
||||
WebPDispatchAlphaToGreen(data, width, picture.width, picture.height,
|
||||
picture.argb, picture.argb_stride);
|
||||
|
||||
WebPConfigInit(&config);
|
||||
if (!WebPConfigInit(&config)) return 0;
|
||||
config.lossless = 1;
|
||||
// Enable exact, or it would alter RGB values of transparent alpha, which is
|
||||
// normally OK but not here since we are not encoding the input image but an
|
||||
|
@ -1675,7 +1675,9 @@ int VP8LEncodeStream(const WebPConfig* const config,
|
||||
}
|
||||
|
||||
// Avoid "garbage value" error from Clang's static analysis tool.
|
||||
WebPPictureInit(&picture_side);
|
||||
if (!WebPPictureInit(&picture_side)) {
|
||||
goto Error;
|
||||
}
|
||||
|
||||
// Analyze image (entropy, num_palettes etc)
|
||||
if (!EncoderAnalyze(enc_main, crunch_configs, &num_crunch_configs_main,
|
||||
|
Reference in New Issue
Block a user