[devel] Added some "(unsigned int)" typecasts in pngvalid.c printf statements.

This commit is contained in:
Glenn Randers-Pehrson 2010-10-08 13:35:02 -05:00
parent 4f5b846bb4
commit e9c395a3bf
3 changed files with 10 additions and 5 deletions

View File

@ -410,6 +410,7 @@ Version 1.5.0beta49 [October 8, 2010]
Version 1.5.0beta50 [October 8, 2010]
Revised Makefile.in to account for mkinstalldirs being removed.
Added some "(unsigned int)" typecasts in printf statements in pngvalid.c.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
(subscription required; visit

View File

@ -3048,6 +3048,7 @@ Version 1.5.0beta49 [October 8, 2010]
Version 1.5.0beta50 [October 8, 2010]
Revised Makefile.in to account for mkinstalldirs being removed.
Added some "(unsigned int)" typecasts in printf statements in pngvalid.c.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -821,7 +821,8 @@ store_pool_delete(png_store *ps, store_pool *pool)
pool->list = next->next;
next->next = NULL;
fprintf(stderr, "\t%ud bytes @ %p\n", next->size, next+1);
fprintf(stderr, "\t%ud bytes @ %p\n",
(unsigned int)next->size, next+1);
/* The NULL means this will always return, even if the memory is
* corrupted.
*/
@ -3652,10 +3653,12 @@ int main(int argc, PNG_CONST char **argv)
printf("Allocated memory statistics (in bytes):\n"
"\tread %u maximum single, %u peak, %u total\n"
"\twrite %u maximum single, %u peak, %u total\n",
pm.this.read_memory_pool.max_max, pm.this.read_memory_pool.max_limit,
pm.this.read_memory_pool.max_total, pm.this.write_memory_pool.max_max,
pm.this.write_memory_pool.max_limit,
pm.this.write_memory_pool.max_total);
(unsigned int)pm.this.read_memory_pool.max_max,
(unsigned int)pm.this.read_memory_pool.max_limit,
(unsigned int)pm.this.read_memory_pool.max_total,
(unsigned int)pm.this.write_memory_pool.max_max,
(unsigned int)pm.this.write_memory_pool.max_limit,
(unsigned int)pm.this.write_memory_pool.max_total);
}
/* Do this here to provoke memory corruption errors in memory not directly