[devel] Minor changes to work round warnings in gcc 3.4

This commit is contained in:
John Bowler 2010-12-19 16:33:20 -06:00 committed by Glenn Randers-Pehrson
parent 8f6628ed9f
commit 56a739bf4e
2 changed files with 14 additions and 14 deletions

7
png.c
View File

@ -441,11 +441,10 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask,
} }
#endif #endif
if (num == -1) if (num != -1)
info_ptr->free_me &= ~mask; mask &= ~PNG_FREE_MUL;
else info_ptr->free_me &= ~mask;
info_ptr->free_me &= ~(mask & ~PNG_FREE_MUL);
} }
/* This is an internal routine to free any memory that the info struct is /* This is an internal routine to free any memory that the info struct is

View File

@ -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, png_uint_32 PNG_CONST w, png_uint_32 PNG_CONST h,
int PNG_CONST do_interlace) int PNG_CONST do_interlace)
{ {
char name[FILE_NAME_SIZE];
context(ps, fault); 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 Try
{ {
png_infop pi; png_infop pi;
png_structp pp;
unsigned int pixel_size; 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 /* 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 * 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 static void
make_error(png_store* ps, png_byte PNG_CONST colour_type, png_byte bit_depth, make_error(png_store* volatile ps, png_byte PNG_CONST colour_type,
int interlace_type, int test, png_const_charp name) png_byte bit_depth, int interlace_type, int test, png_const_charp name)
{ {
context(ps, fault); context(ps, fault);