mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[devel] Make all png_debug macros into *unterminated* statements
or expressions (i.e. a trailing ';' must always be added) and correct the format statements in various png_debug messages.
This commit is contained in:
24
pngrutil.c
24
pngrutil.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngrutil.c - utilities to read a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.4.1 [March 9, 2010]
|
||||
* Last changed in libpng 1.4.1 [March 10, 2010]
|
||||
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
@@ -89,7 +89,7 @@ png_read_chunk_header(png_structp png_ptr)
|
||||
/* Put the chunk name into png_ptr->chunk_name */
|
||||
png_memcpy(png_ptr->chunk_name, buf + 4, 4);
|
||||
|
||||
png_debug2(0, "Reading %s chunk, length = %lu",
|
||||
png_debug2(0, "Reading %s chunk, length = %u",
|
||||
png_ptr->chunk_name, length);
|
||||
|
||||
/* Reset the crc and run it over the chunk name */
|
||||
@@ -481,7 +481,7 @@ png_handle_IHDR(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->width);
|
||||
png_debug1(3, "bit_depth = %d", png_ptr->bit_depth);
|
||||
png_debug1(3, "channels = %d", png_ptr->channels);
|
||||
png_debug1(3, "rowbytes = %lu", png_ptr->rowbytes);
|
||||
png_debug1(3, "rowbytes = %u", png_ptr->rowbytes);
|
||||
png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth,
|
||||
color_type, interlace_type, compression_type, filter_type);
|
||||
}
|
||||
@@ -1669,7 +1669,7 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
return;
|
||||
}
|
||||
|
||||
png_debug1(2, "Allocating and reading pCAL chunk data (%lu bytes)",
|
||||
png_debug1(2, "Allocating and reading pCAL chunk data (%u bytes)",
|
||||
length + 1);
|
||||
png_free(png_ptr, png_ptr->chunkdata);
|
||||
png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1);
|
||||
@@ -1809,7 +1809,7 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
return;
|
||||
}
|
||||
|
||||
png_debug1(2, "Allocating and reading sCAL chunk data (%lu bytes)",
|
||||
png_debug1(2, "Allocating and reading sCAL chunk data (%u bytes)",
|
||||
length + 1);
|
||||
png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1);
|
||||
if (png_ptr->chunkdata == NULL)
|
||||
@@ -2909,7 +2909,7 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep row,
|
||||
png_bytep prev_row, int filter)
|
||||
{
|
||||
png_debug(1, "in png_read_filter_row");
|
||||
png_debug2(2, "row = %lu, filter = %d", png_ptr->row_number, filter);
|
||||
png_debug2(2, "row = %u, filter = %d", png_ptr->row_number, filter);
|
||||
switch (filter)
|
||||
{
|
||||
case PNG_FILTER_VALUE_NONE:
|
||||
@@ -3357,12 +3357,12 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
|
||||
|
||||
png_memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1);
|
||||
|
||||
png_debug1(3, "width = %lu,", png_ptr->width);
|
||||
png_debug1(3, "height = %lu,", png_ptr->height);
|
||||
png_debug1(3, "iwidth = %lu,", png_ptr->iwidth);
|
||||
png_debug1(3, "num_rows = %lu,", png_ptr->num_rows);
|
||||
png_debug1(3, "rowbytes = %lu,", png_ptr->rowbytes);
|
||||
png_debug1(3, "irowbytes = %lu",
|
||||
png_debug1(3, "width = %u,", png_ptr->width);
|
||||
png_debug1(3, "height = %u,", png_ptr->height);
|
||||
png_debug1(3, "iwidth = %u,", png_ptr->iwidth);
|
||||
png_debug1(3, "num_rows = %u,", png_ptr->num_rows);
|
||||
png_debug1(3, "rowbytes = %u,", png_ptr->rowbytes);
|
||||
png_debug1(3, "irowbytes = %u",
|
||||
PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->iwidth) + 1);
|
||||
|
||||
png_ptr->flags |= PNG_FLAG_ROW_INIT;
|
||||
|
||||
Reference in New Issue
Block a user