From 56a739bf4eec0de9579ad3a46440282953d53067 Mon Sep 17 00:00:00 2001 From: John Bowler Date: Sun, 19 Dec 2010 16:33:20 -0600 Subject: [PATCH] [devel] Minor changes to work round warnings in gcc 3.4 --- png.c | 7 +++---- pngvalid.c | 21 +++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/png.c b/png.c index 84b41bf75..56267265d 100644 --- a/png.c +++ b/png.c @@ -441,11 +441,10 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask, } #endif - if (num == -1) - info_ptr->free_me &= ~mask; + if (num != -1) + mask &= ~PNG_FREE_MUL; - else - info_ptr->free_me &= ~(mask & ~PNG_FREE_MUL); + info_ptr->free_me &= ~mask; } /* This is an internal routine to free any memory that the info struct is diff --git a/pngvalid.c b/pngvalid.c index 30d5a63eb..6f3a8979d 100644 --- a/pngvalid.c +++ b/pngvalid.c @@ -2221,20 +2221,21 @@ make_size_image(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, png_uint_32 PNG_CONST w, png_uint_32 PNG_CONST h, int PNG_CONST do_interlace) { - char name[FILE_NAME_SIZE]; context(ps, fault); - /* Make a name and get an appropriate id: */ - PNG_CONST png_uint_32 id = FILEID(colour_type, bit_depth, interlace_type, - w, h, do_interlace); - - standard_name_from_id(name, sizeof name, 0, id); - Try { png_infop pi; + png_structp pp; unsigned int pixel_size; - png_structp pp = set_store_for_write(ps, &pi, name); + + /* Make a name and get an appropriate id for the store: */ + char name[FILE_NAME_SIZE]; + PNG_CONST png_uint_32 id = FILEID(colour_type, bit_depth, interlace_type, + w, h, do_interlace); + + standard_name_from_id(name, sizeof name, 0, id); + pp = set_store_for_write(ps, &pi, name); /* In the event of a problem return control to the Catch statement below * to do the clean up - it is not possible to 'return' directly from a Try @@ -2455,8 +2456,8 @@ static PNG_CONST struct }; static void -make_error(png_store* ps, png_byte PNG_CONST colour_type, png_byte bit_depth, - int interlace_type, int test, png_const_charp name) +make_error(png_store* volatile ps, png_byte PNG_CONST colour_type, + png_byte bit_depth, int interlace_type, int test, png_const_charp name) { context(ps, fault);