diff --git a/examples/anim_util.c b/examples/anim_util.c index 73fc7b97..5c593df3 100644 --- a/examples/anim_util.c +++ b/examples/anim_util.c @@ -265,6 +265,8 @@ static int ReadAnimatedWebP(const char filename[], // ----------------------------------------------------------------------------- // GIF Decoding. +#ifdef WEBP_HAVE_GIF + // Returns true if this is a valid GIF bitstream. static int IsGIF(const WebPData* const data) { return data->size > GIF_STAMP_LEN && @@ -273,8 +275,6 @@ static int IsGIF(const WebPData* const data) { !memcmp(GIF89_STAMP, data->bytes, GIF_STAMP_LEN)); } -#ifdef WEBP_HAVE_GIF - // GIFLIB_MAJOR is only defined in libgif >= 4.2.0. #if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) # define LOCAL_GIF_VERSION ((GIFLIB_MAJOR << 8) | GIFLIB_MINOR) @@ -665,6 +665,11 @@ static int ReadAnimatedGIF(const char filename[], AnimatedImage* const image, #else +static int IsGIF(const WebPData* const data) { + (void)data; + return 0; +} + static int ReadAnimatedGIF(const char filename[], AnimatedImage* const image, int dump_frames, const char dump_folder[]) { (void)filename;