[libpng16] Changed deprecated png_free_default() to free() in pngtest.c
Changed tabs to 3 spaces in png_debug macros and changed '"%s"m' to '"%s" m' to improve portability among compilers.
This commit is contained in:
parent
1f63da349b
commit
83b132f14d
3
ANNOUNCE
3
ANNOUNCE
@ -47,7 +47,8 @@ Version 1.6.8beta01 [November 28, 2013]
|
|||||||
Version 1.6.8beta02 [November 28, 2013]
|
Version 1.6.8beta02 [November 28, 2013]
|
||||||
Removed or marked PNG_UNUSED some harmless "dead assignments" reported
|
Removed or marked PNG_UNUSED some harmless "dead assignments" reported
|
||||||
by clang scan-build.
|
by clang scan-build.
|
||||||
Changed tabs to 3 spaces in png_debug macros and changed '"%s"m' to '"%s" m'
|
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
|
Changed png_free_default() to free() in pngtest.c
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
|
3
CHANGES
3
CHANGES
@ -4733,7 +4733,8 @@ Version 1.6.8beta01 [November 24, 2013]
|
|||||||
Version 1.6.8beta02 [November 28, 2013]
|
Version 1.6.8beta02 [November 28, 2013]
|
||||||
Removed or marked PNG_UNUSED some harmless "dead assignments" reported
|
Removed or marked PNG_UNUSED some harmless "dead assignments" reported
|
||||||
by clang scan-build.
|
by clang scan-build.
|
||||||
Changed tabs to 3 spaces in png_debug macros and changed '"%s"m' to '"%s" m'
|
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
|
Changed png_free_default() to free() in pngtest.c
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.6.8 [(PENDING RELEASE)]
|
* Last changed in libpng 1.5.18 [(PENDING RELEASE)]
|
||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
* For conditions of distribution and use, see the disclaimer
|
* For conditions of distribution and use, see the disclaimer
|
||||||
@ -25,7 +25,7 @@
|
|||||||
* (actually ((void)0)).
|
* (actually ((void)0)).
|
||||||
*
|
*
|
||||||
* level: level of detail of message, starting at 0. A level 'n'
|
* level: level of detail of message, starting at 0. A level 'n'
|
||||||
* message is preceded by 'n' tab characters (not implemented
|
* message is preceded by 'n' 3-space indentations (not implemented
|
||||||
* on Microsoft compilers unless PNG_DEBUG_FILE is also
|
* on Microsoft compilers unless PNG_DEBUG_FILE is also
|
||||||
* defined, to allow debug DLL compilation with no standard IO).
|
* defined, to allow debug DLL compilation with no standard IO).
|
||||||
* message: a printf(3) style text string. A trailing '\n' is added
|
* message: a printf(3) style text string. A trailing '\n' is added
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngtest.c - a simple test program to test libpng
|
/* pngtest.c - a simple test program to test libpng
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.6.2 [April 25, 2013]
|
* Last changed in libpng 1.6.8 [(PENDING RELEASE)]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@ -574,7 +574,8 @@ png_debug_free(png_structp png_ptr, png_voidp ptr)
|
|||||||
/* We must free the list element too, but first kill
|
/* We must free the list element too, but first kill
|
||||||
the memory that is to be freed. */
|
the memory that is to be freed. */
|
||||||
memset(ptr, 0x55, pinfo->size);
|
memset(ptr, 0x55, pinfo->size);
|
||||||
png_free_default(png_ptr, pinfo);
|
if (pinfo)
|
||||||
|
free(pinfo);
|
||||||
pinfo = NULL;
|
pinfo = NULL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -593,7 +594,8 @@ png_debug_free(png_structp png_ptr, png_voidp ptr)
|
|||||||
if (verbose)
|
if (verbose)
|
||||||
printf("Freeing %p\n", ptr);
|
printf("Freeing %p\n", ptr);
|
||||||
|
|
||||||
png_free_default(png_ptr, ptr);
|
if (ptr)
|
||||||
|
free(ptr);
|
||||||
ptr = NULL;
|
ptr = NULL;
|
||||||
}
|
}
|
||||||
#endif /* PNG_USER_MEM_SUPPORTED && PNG_DEBUG */
|
#endif /* PNG_USER_MEM_SUPPORTED && PNG_DEBUG */
|
||||||
|
Loading…
Reference in New Issue
Block a user