From 272fcca5b20fdc12859ad5aab25ccbe91c768009 Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Mon, 13 Aug 2012 14:23:17 +1000 Subject: [PATCH] allow building GIF/imgif.c on C89 compilers --- Changes | 2 ++ GIF/imgif.c | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Changes b/Changes index 40ac036a..f3839748 100644 --- a/Changes +++ b/Changes @@ -6,6 +6,8 @@ Imager release history. Older releases can be found in Changes.old - allow building JPEG/imexif.c on C89 compilers. + - allow building GIF/imgif.c on C89 compilers. + Imager 0.91 - 4 Jun 2012 =========== diff --git a/GIF/imgif.c b/GIF/imgif.c index 55b577a6..78f6554e 100644 --- a/GIF/imgif.c +++ b/GIF/imgif.c @@ -923,15 +923,14 @@ Returns NULL if the page isn't found. i_img * i_readgif_single_wiol(io_glue *ig, int page) { - i_clear_error(); + GifFileType *GifFile; + i_clear_error(); if (page < 0) { i_push_error(0, "page must be non-negative"); return NULL; } - GifFileType *GifFile; - if ((GifFile = DGifOpen((void *)ig, io_glue_read_cb )) == NULL) { gif_push_error(); i_push_error(0, "Cannot create giflib callback object"); -- 2.39.5