[libpng17] Tidied up pngfix inits and fixed pngtest no-write builds.

This commit is contained in:
John Bowler 2013-12-01 15:50:03 -06:00 committed by Glenn Randers-Pehrson
parent 05f896004f
commit 5a1b8d106d
4 changed files with 10 additions and 17 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.7.0beta24 - November 28, 2013
Libpng 1.7.0beta24 - December 1, 2013
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.
@ -437,12 +437,13 @@ Version 1.7.0beta23 [November 24, 2013]
This reverts to the previous 'static' implementation and works round
the 'unused static function' warning by using PNG_UNUSED().
Version 1.7.0beta24 [November 28, 2013]
Version 1.7.0beta24 [December 1, 2013]
Removed or marked PNG_UNUSED some harmless "dead assignments" reported
by clang scan-build.
Changed tabs to 3 spaces in png_debug macros and changed '"%s"m'
to '"%s" m' to improve portability among compilers.
Changed png_free_default() to free() in pngtest.c
Tidied up pngfix inits and fixed pngtest no-write builds.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -4726,12 +4726,13 @@ Version 1.7.0beta23 [November 24, 2013]
This reverts to the previous 'static' implementation and works round
the 'unused static function' warning by using PNG_UNUSED().
Version 1.7.0beta24 [November 28, 2013]
Version 1.7.0beta24 [December 1, 2013]
Removed or marked PNG_UNUSED some harmless "dead assignments" reported
by clang scan-build.
Changed tabs to 3 spaces in png_debug macros and changed '"%s"m'
to '"%s" m' to improve portability among compilers.
Changed png_free_default() to free() in pngtest.c
Tidied up pngfix inits and fixed pngtest no-write builds.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -1575,7 +1575,7 @@ chunk_end(struct chunk **chunk_var)
}
static void
chunk_init(struct chunk *chunk, struct file *file)
chunk_init(struct chunk * const chunk, struct file * const file)
/* When a chunk is initialized the file length/type/pos are copied into the
* corresponding chunk fields and the new chunk is registered in the file
* structure. There can only be one chunk at a time.
@ -1784,7 +1784,7 @@ IDAT_end(struct IDAT **idat_var)
}
static void
IDAT_init(struct IDAT *idat, struct file *file)
IDAT_init(struct IDAT * const idat, struct file * const file)
/* When the chunk is png_IDAT instantiate an IDAT control structure in place
* of a chunk control structure. The IDAT will instantiate a chunk control
* structure using the file alloc routine.
@ -3545,22 +3545,14 @@ allocate(struct file *file, int allocate_idat)
if (allocate_idat)
{
struct IDAT *idat;
assert(file->idat == NULL);
idat = &control->idat;
IDAT_init(idat, file);
file->idat = idat;
IDAT_init(&control->idat, file);
}
else /* chunk */
{
struct chunk *chunk;
assert(file->chunk == NULL);
chunk = &control->chunk;
chunk_init(chunk, file);
file->chunk = chunk;
chunk_init(&control->chunk, file);
}
}

View File

@ -115,7 +115,6 @@ static int relaxed = 0;
static int unsupported_chunks = 0; /* chunk unsupported by libpng in input */
static int error_count = 0; /* count calls to png_error */
static int warning_count = 0; /* count calls to png_warning */
static int wrote_question = 0;
/* Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng */
#ifndef png_jmpbuf
@ -1579,10 +1578,10 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
{
for (;;)
{
static int wrote_question = 0;
png_size_t num_in, num_out;
char inbuf[256], outbuf[256];
num_in = fread(inbuf, 1, sizeof inbuf, fpin);
num_out = fread(outbuf, 1, sizeof outbuf, fpout);