From 1b8b69c5f7fcf86a6ecc76463c056979527fbd27 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Tue, 11 Nov 2014 13:51:51 +0800 Subject: io-tiff.c: Declare Variables at the Top of Block ...so that builds on C89 compilers such as pre-2013 Visual Studio can be fixed, taken from diff from John E. https://bugzilla.gnome.org/show_bug.cgi?id=739779 --- gdk-pixbuf/io-tiff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gdk-pixbuf') diff --git a/gdk-pixbuf/io-tiff.c b/gdk-pixbuf/io-tiff.c index 5f753fd67..78eb24306 100644 --- a/gdk-pixbuf/io-tiff.c +++ b/gdk-pixbuf/io-tiff.c @@ -692,6 +692,7 @@ gdk_pixbuf__tiff_image_save_to_callback (GdkPixbufSaveFunc save_func, const gchar *icc_profile = NULL; const gchar *x_dpi = NULL; const gchar *y_dpi = NULL; + guint16 codec; tiff_set_handlers (); @@ -754,7 +755,7 @@ gdk_pixbuf__tiff_image_save_to_callback (GdkPixbufSaveFunc save_func, /* libtiff supports a number of 'codecs' such as: 1 None, 2 Huffman, 5 LZW, 7 JPEG, 8 Deflate, see tiff.h */ - guint16 codec = strtol (compression, NULL, 0); + codec = strtol (compression, NULL, 0); if (TIFFIsCODECConfigured (codec)) TIFFSetField (tiff, TIFFTAG_COMPRESSION, codec); -- cgit v1.2.1