提交 56a739bf 编写于 作者: J John Bowler 提交者: Glenn Randers-Pehrson

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

上级 8f6628ed
...@@ -441,11 +441,10 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask, ...@@ -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
......
...@@ -2221,20 +2221,21 @@ make_size_image(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, ...@@ -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 ...@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册