mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[master] Changed a typecast in pngrutil.c to stifle compiler warning
in the calculation of the png_ptr->rowbuf pointer into png_ptr->big_row_buf.
This commit is contained in:
parent
9b8ddff5b7
commit
cc0bff446b
4
ANNOUNCE
4
ANNOUNCE
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Libpng 1.4.2rc06 - May 3, 2010
|
Libpng 1.4.2rc06 - May 4, 2010
|
||||||
|
|
||||||
This is not intended to be a public release. It will be replaced
|
This is not intended to be a public release. It will be replaced
|
||||||
within a few weeks by a public version or by another test version.
|
within a few weeks by a public version or by another test version.
|
||||||
@ -60,7 +60,7 @@ version 1.4.2rc05 [April 29, 2010]
|
|||||||
png.h is removed if both READ and WRITE USER_TRANSFORM are turned off
|
png.h is removed if both READ and WRITE USER_TRANSFORM are turned off
|
||||||
but was left defined in pngtrans.c
|
but was left defined in pngtrans.c
|
||||||
|
|
||||||
version 1.4.2rc06 [May 3, 2010]
|
version 1.4.2rc06 [May 4, 2010]
|
||||||
Moved declarations of umsg[] inside the proper #ifdef blocks in pngrutil.c
|
Moved declarations of umsg[] inside the proper #ifdef blocks in pngrutil.c
|
||||||
Added a typecast in pngrutil.c to stifle compiler warning in the calculation
|
Added a typecast in pngrutil.c to stifle compiler warning in the calculation
|
||||||
of the png_ptr->rowbuf pointer into png_ptr->big_row_buf.
|
of the png_ptr->rowbuf pointer into png_ptr->big_row_buf.
|
||||||
|
|||||||
2
CHANGES
2
CHANGES
@ -2571,7 +2571,7 @@ version 1.4.2rc05 [April 29, 2010]
|
|||||||
png.h is removed if both READ and WRITE USER_TRANSFORM are turned off
|
png.h is removed if both READ and WRITE USER_TRANSFORM are turned off
|
||||||
but was left defined in pngtrans.c
|
but was left defined in pngtrans.c
|
||||||
|
|
||||||
version 1.4.2rc06 [May 3, 2010]
|
version 1.4.2rc06 [May 4, 2010]
|
||||||
Moved declarations of umsg[] inside the proper #ifdef blocks in pngrutil.c
|
Moved declarations of umsg[] inside the proper #ifdef blocks in pngrutil.c
|
||||||
Added a typecast in pngrutil.c to stifle compiler warning in the calculation
|
Added a typecast in pngrutil.c to stifle compiler warning in the calculation
|
||||||
of the png_ptr->rowbuf pointer into png_ptr->big_row_buf.
|
of the png_ptr->rowbuf pointer into png_ptr->big_row_buf.
|
||||||
|
|||||||
15
pngrutil.c
15
pngrutil.c
@ -3312,6 +3312,11 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
|
|||||||
|
|
||||||
if (row_bytes + 48 > png_ptr->old_big_row_buf_size)
|
if (row_bytes + 48 > png_ptr->old_big_row_buf_size)
|
||||||
{
|
{
|
||||||
|
#ifdef PNG_ALIGNED_MEMORY_SUPPORTED
|
||||||
|
png_size_t big_row_buf_address;
|
||||||
|
int row_buf_offset;
|
||||||
|
#endif
|
||||||
|
|
||||||
png_free(png_ptr, png_ptr->big_row_buf);
|
png_free(png_ptr, png_ptr->big_row_buf);
|
||||||
if (png_ptr->interlaced)
|
if (png_ptr->interlaced)
|
||||||
png_ptr->big_row_buf = (png_bytep)png_calloc(png_ptr,
|
png_ptr->big_row_buf = (png_bytep)png_calloc(png_ptr,
|
||||||
@ -3325,10 +3330,12 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
|
|||||||
/* Use 16-byte aligned memory for row_buf with at least 16 bytes
|
/* Use 16-byte aligned memory for row_buf with at least 16 bytes
|
||||||
* of padding before and after row_buf.
|
* of padding before and after row_buf.
|
||||||
*/
|
*/
|
||||||
png_ptr->row_buf = png_ptr->big_row_buf + 32
|
{
|
||||||
- (((png_alloc_size_t)&(png_ptr->big_row_buf[0])
|
big_row_buf_address = (png_size_t)png_ptr->big_row_buf;
|
||||||
+ (png_alloc_size_t)15) % 16);
|
row_buf_offset = 32 - ((big_row_buf_address + 15) & 0x0F);
|
||||||
png_ptr->old_big_row_buf_size = row_bytes + 48;
|
png_ptr->row_buf = png_ptr->big_row_buf + row_buf_offset;
|
||||||
|
}
|
||||||
|
png_ptr->old_big_row_buf_size = row_bytes + 48;
|
||||||
#else
|
#else
|
||||||
/* Use 32 bytes of padding before and 16 bytes after row_buf. */
|
/* Use 32 bytes of padding before and 16 bytes after row_buf. */
|
||||||
png_ptr->row_buf = png_ptr->big_row_buf + 32;
|
png_ptr->row_buf = png_ptr->big_row_buf + 32;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user