diff --git a/CHANGES b/CHANGES index 1532e3da7..9ccbaf5c6 100644 --- a/CHANGES +++ b/CHANGES @@ -200,7 +200,7 @@ version 0.98 [January, 1998] PNG_TIME_RFC1152_SUPPORTED macro to PNG_TIME_RFC1123_SUPPORTED added png_invert_alpha capability (Glenn R-P -- suggestion by Jon Vincent) changed srgb_intent from png_byte to int to avoid compiler bugs -version 0.99 [January, 1998] +version 0.99 [January 30, 1998] free info_ptr->text instead of end_info_ptr->text in pngread.c (John Bowler) fixed a longstanding "packswap" bug in pngtrans.c fixed some inconsistencies in pngconf.h that prevented compiling with @@ -213,3 +213,6 @@ version 0.99 [January, 1998] added TARGET_MACOS similar to zlib-1.0.8 define PNG_ALWAYS_EXTERN when __MWERKS__ && WIN32 are defined added type casting to all png_malloc() function calls +version 0.99a [January 31, 1998] + added type casts and parentheses to all returns that return a value.(Tim W.) + diff --git a/README b/README index 466c28cc4..bf0c9dd76 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -[NOTE: this is still beta version 0.99; the text below has already +[NOTE: this is still beta version 0.99a; the text below has already been updated in anticipation of the imminent 1.0 release.] diff --git a/libpng.txt b/libpng.txt index 13af52e9c..39b6e34ac 100644 --- a/libpng.txt +++ b/libpng.txt @@ -1,9 +1,9 @@ libpng.txt - a description on how to use and modify libpng - libpng version 0.99 + libpng version 0.99a Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998, Glenn Randers-Pehrson - January 30, 1998 + January 31, 1998 based on: diff --git a/png.c b/png.c index 4455009ab..8a6b7cf16 100644 --- a/png.c +++ b/png.c @@ -1,12 +1,12 @@ /* png.c - location for general purpose libpng functions * - * libpng 0.99 + * libpng 0.99a * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. * Copyright (c) 1996, 1997 Andreas Dilger * Copyright (c) 1998, Glenn Randers-Pehrson - * January 30, 1998 + * January 31, 1998 */ #define PNG_INTERNAL @@ -16,7 +16,7 @@ /* Version information for C files. This had better match the version * string defined in png.h. */ -char png_libpng_ver[5] = "0.99"; +char png_libpng_ver[6] = "0.99"; /* Place to hold the signature string for a PNG file. */ png_byte FARDATA png_sig[8] = {137, 80, 78, 71, 13, 10, 26, 10}; @@ -103,15 +103,15 @@ png_sig_cmp(png_bytep sig, png_size_t start, png_size_t num_to_check) if (num_to_check > 8) num_to_check = 8; else if (num_to_check < 1) - return 0; + return (0); if (start > 7) - return 0; + return (0); if (start + num_to_check > 8) num_to_check = 8 - start; - return (png_memcmp(&sig[start], &png_sig[start], num_to_check)); + return ((int)(png_memcmp(&sig[start], &png_sig[start], num_to_check))); } /* (Obsolete) function to check signature bytes. It does not allow one @@ -121,7 +121,7 @@ png_sig_cmp(png_bytep sig, png_size_t start, png_size_t num_to_check) int png_check_sig(png_bytep sig, int num) { - return !png_sig_cmp(sig, (png_size_t)0, (png_size_t)num); + return ((int)!png_sig_cmp(sig, (png_size_t)0, (png_size_t)num)); } /* Function to allocate memory for zlib. */ @@ -143,7 +143,7 @@ png_zalloc(voidpf png_ptr, uInt items, uInt size) { png_memset(ptr, 0, (png_size_t)num_bytes); } - return (voidpf)(ptr); + return ((voidpf)ptr); } /* function to free memory for zlib */ @@ -205,7 +205,7 @@ png_create_info_struct(png_structp png_ptr) png_info_init(info_ptr); } - return info_ptr; + return (info_ptr); } /* This function frees the memory associated with a single info struct. @@ -286,7 +286,7 @@ png_info_destroy(png_structp png_ptr, png_infop info_ptr) png_voidp png_get_io_ptr(png_structp png_ptr) { - return png_ptr->io_ptr; + return (png_ptr->io_ptr); } #if !defined(PNG_NO_STDIO) diff --git a/png.h b/png.h index e8def21a3..cb7c7cc7c 100644 --- a/png.h +++ b/png.h @@ -1,12 +1,12 @@ /* png.h - header file for PNG reference library * - * libpng 0.99 beta + * libpng 0.99a beta * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. * Copyright (c) 1996, 1997 Andreas Dilger * Copyright (c) 1998 Glenn Randers-Pehrson - * January 30, 1998 + * January 31, 1998 * * Note about libpng version numbers: * @@ -27,6 +27,7 @@ * 0.97c 0.97 2.0.97 * 0.98 0.98 2.0.98 * 0.99 0.99 2.0.99 + * 0.99a 0.99 2.0.99 * 1.0 1.00 2.1.0 * * Henceforth the source version will match the shared-library minor diff --git a/pngconf.h b/pngconf.h index e89bfce03..f14f0e13a 100644 --- a/pngconf.h +++ b/pngconf.h @@ -1,12 +1,12 @@ /* pngconf.c - machine configurable file for libpng * - * libpng 0.99 + * libpng 0.99a * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. * Copyright (c) 1996, 1997 Andreas Dilger * Copyright (c) 1998, Glenn Randers-Pehrson - * January 30, 1998 + * January 31, 1998 */ /* Any machine specific code is near the front of this file, so if you diff --git a/pngerror.c b/pngerror.c index 5335e98c1..15edb72ff 100644 --- a/pngerror.c +++ b/pngerror.c @@ -1,12 +1,12 @@ /* pngerror.c - stub functions for i/o and memory allocation * - * libpng 0.99 + * libpng 0.99a * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. * Copyright (c) 1996, 1997 Andreas Dilger * Copyright (c) 1998, Glenn Randers-Pehrson - * January 30, 1998 + * January 31, 1998 * * This file provides a location for all error handling. Users which * need special error handling are expected to write replacement functions @@ -167,7 +167,7 @@ png_set_error_fn(png_structp png_ptr, png_voidp error_ptr, png_voidp png_get_error_ptr(png_structp png_ptr) { - return png_ptr->error_ptr; + return ((png_voidp)png_ptr->error_ptr); } diff --git a/pngget.c b/pngget.c index 4dd3286e6..d24132753 100644 --- a/pngget.c +++ b/pngget.c @@ -1,12 +1,12 @@ /* pngget.c - retrieval of values from info struct * - * libpng 0.99 + * libpng 0.99a * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. * Copyright (c) 1996, 1997 Andreas Dilger * Copyright (c) 1998, Glenn Randers-Pehrson - * January 30, 1998 + * January 31, 1998 */ #define PNG_INTERNAL @@ -126,14 +126,14 @@ png_get_pixel_aspect_ratio(png_structp png_ptr, png_infop info_ptr) { png_debug1(1, "in %s retrieval function\n", "png_get_aspect_ratio"); if (info_ptr->x_pixels_per_unit == 0) - return NULL; + return (0.0); else - return (float)info_ptr->y_pixels_per_unit - /(float)info_ptr->x_pixels_per_unit; + return ((float)info_ptr->y_pixels_per_unit + /(float)info_ptr->x_pixels_per_unit); } else #endif - return (0); + return (0.0); } png_uint_32 diff --git a/pngmem.c b/pngmem.c index e3f317120..cbc83c507 100644 --- a/pngmem.c +++ b/pngmem.c @@ -1,11 +1,11 @@ /* pngmem.c - stub functions for memory allocation * - * libpng 0.99 + * libpng 0.99a * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. * Copyright (c) 1996, 1997 Andreas Dilger * Copyright (c) 1998, Glenn Randers-Pehrson - * January 30, 1998 + * January 31, 1998 * * This file provides a location for all memory allocation. Users which * need special memory handling are expected to modify the code in this file @@ -42,7 +42,7 @@ png_create_struct(int type) else if (type == PNG_STRUCT_PNG) size = sizeof(png_struct); else - return (png_voidp)NULL; + return ((png_voidp)NULL); if ((struct_ptr = (png_voidp)farmalloc(size)) != NULL) { @@ -88,7 +88,7 @@ PNG_MALLOC(png_structp png_ptr, png_uint_32 size) { png_voidp ret; if (png_ptr == NULL || size == 0) - return ((voidp)NULL); + return ((png_voidp)NULL); #ifdef PNG_MAX_MALLOC_64K if (size > (png_uint_32)65536L) @@ -177,7 +177,7 @@ PNG_MALLOC(png_structp png_ptr, png_uint_32 size) png_error(png_ptr, "Out of memory."); /* Note "o" and "m" */ } - return ret; + return (ret); } /* free a pointer allocated by PNG_MALLOC(). In the default @@ -234,7 +234,7 @@ png_create_struct(int type) else if (type == PNG_STRUCT_PNG) size = sizeof(png_struct); else - return (png_voidp)NULL; + return ((png_voidp)NULL); #if defined(__TURBOC__) && !defined(__FLAT__) if ((struct_ptr = (png_voidp)farmalloc(size)) != NULL) @@ -286,7 +286,7 @@ PNG_MALLOC(png_structp png_ptr, png_uint_32 size) { png_voidp ret; if (png_ptr == NULL || size == 0) - return (NULL); + return ((png_voidp)NULL); #ifdef PNG_MAX_MALLOC_64K if (size > (png_uint_32)65536L) @@ -308,7 +308,7 @@ PNG_MALLOC(png_structp png_ptr, png_uint_32 size) png_error(png_ptr, "Out of Memory"); } - return ret; + return (ret); } /* Free a pointer allocated by PNG_MALLOC(). In the default diff --git a/pngpread.c b/pngpread.c index 100e2baf1..647ad10d6 100644 --- a/pngpread.c +++ b/pngpread.c @@ -1,12 +1,12 @@ /* pngpread.c - read a png file in push mode * - * libpng 0.99 + * libpng 0.99a * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. * Copyright (c) 1996, 1997 Andreas Dilger * Copyright (c) 1998, Glenn Randers-Pehrson - * January 30, 1998 + * January 31, 1998 */ #define PNG_INTERNAL diff --git a/pngread.c b/pngread.c index 9dbae725d..9d83fb7f5 100644 --- a/pngread.c +++ b/pngread.c @@ -1,12 +1,12 @@ /* pngread.c - read a PNG file * - * libpng 0.99 + * libpng 0.99a * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. * Copyright (c) 1996, 1997 Andreas Dilger * Copyright (c) 1998, Glenn Randers-Pehrson - * January 30, 1998 + * January 31, 1998 * * This file contains routines that an application calls directly to * read a PNG file or stream. diff --git a/pngrio.c b/pngrio.c index 18afee3f4..7926b9e87 100644 --- a/pngrio.c +++ b/pngrio.c @@ -1,12 +1,12 @@ /* pngrio.c - functions for data input * - * libpng 0.99 + * libpng 0.99a * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. * Copyright (c) 1996, 1997 Andreas Dilger * Copyright (c) 1998, Glenn Randers-Pehrson - * January 30, 1998 + * January 31, 1998 * * This file provides a location for all input. Users which need * special handling are expected to write a function which has the same diff --git a/pngrtran.c b/pngrtran.c index fac55d7e5..77098afcd 100644 --- a/pngrtran.c +++ b/pngrtran.c @@ -1,12 +1,12 @@ /* pngrtran.c - transforms the data in a row for PNG readers * - * libpng 0.99 + * libpng 0.99a * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. * Copyright (c) 1996, 1997 Andreas Dilger * Copyright (c) 1998, Glenn Randers-Pehrson - * January 30, 1998 + * January 31, 1998 * * This file contains functions optionally called by an application * in order to tell libpng how to handle data when reading a PNG. diff --git a/pngrutil.c b/pngrutil.c index 73e1a53a5..bd6944a79 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -1,12 +1,12 @@ /* pngrutil.c - utilities to read a PNG file * - * libpng 0.99 + * libpng 0.99a * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. * Copyright (c) 1996, 1997 Andreas Dilger * Copyright (c) 1998, Glenn Randers-Pehrson - * January 30, 1998 + * January 31, 1998 * * This file contains routines which are only called from within * libpng itself during the course of reading an image. @@ -27,7 +27,7 @@ png_get_uint_32(png_bytep buf) ((png_uint_32)(*(buf + 2)) << 8) + (png_uint_32)(*(buf + 3)); - return i; + return (i); } #if defined(PNG_READ_pCAL_SUPPORTED) @@ -44,7 +44,7 @@ png_get_int_32(png_bytep buf) ((png_int_32)(*(buf + 2)) << 8) + (png_int_32)(*(buf + 3)); - return i; + return (i); } #endif /* PNG_READ_pCAL_SUPPORTED */ @@ -57,7 +57,7 @@ png_get_uint_16(png_bytep buf) i = (png_uint_16)(((png_uint_16)(*buf) << 8) + (png_uint_16)(*(buf + 1))); - return i; + return (i); } #endif /* PNG_READ_BIG_ENDIAN_SUPPORTED */ @@ -100,10 +100,10 @@ png_crc_finish(png_structp png_ptr, png_uint_32 skip) { png_chunk_error(png_ptr, "CRC error"); } - return 1; + return (1); } - return 0; + return (0); } /* Compare the CRC stored in the PNG file with that calculated by libpng from @@ -132,10 +132,10 @@ png_crc_error(png_structp png_ptr) if (need_crc) { crc = png_get_uint_32(crc_bytes); - return (crc != png_ptr->crc); + return ((int)(crc != png_ptr->crc)); } else - return 0; + return (0); } diff --git a/pngset.c b/pngset.c index f4fbb6568..502013e45 100644 --- a/pngset.c +++ b/pngset.c @@ -1,12 +1,12 @@ /* pngset.c - storage of image information into info struct * - * libpng 0.99 + * libpng 0.99a * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. * Copyright (c) 1996, 1997 Andreas Dilger * Copyright (c) 1998, Glenn Randers-Pehrson - * January 30, 1998 + * January 31, 1998 * * The functions here are used during reads to store data from the file * into the info struct, and during writes to store application data diff --git a/pngtest.c b/pngtest.c index 1e69f0d4a..5c12f1f55 100644 --- a/pngtest.c +++ b/pngtest.c @@ -1,12 +1,12 @@ /* pngtest.c - a simple test program to test libpng * - * libpng 0.99 + * libpng 0.99a * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. * Copyright (c) 1996, 1997 Andreas Dilger * Copyright (c) 1998, Glenn Randers-Pehrson - * January 30, 1998 + * January 31, 1998 * * This program reads in a PNG image, writes it out again, and then * compares the two files. If the files are identical, this shows that @@ -281,10 +281,10 @@ png_voidp png_malloc(png_structp png_ptr, png_uint_32 size) { if (png_ptr == NULL) { fprintf(STDERR, "NULL pointer to memory allocator\n"); - return NULL; + return (NULL); } if (size == 0) - return NULL; + return (NULL); /* This calls the library allocator twice, once to get the requested buffer and once to get a new free list entry. */ @@ -299,7 +299,7 @@ png_malloc(png_structp png_ptr, png_uint_32 size) { pinformation = pinfo; /* Make sure the caller isn't assuming zeroed memory. */ png_memset(pinfo->pointer, 0xdd, pinfo->size); - return pinfo->pointer; + return ((png_voidp)pinfo->pointer); } } @@ -369,14 +369,14 @@ int test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) if ((fpin = fopen(inname, "rb")) == NULL) { fprintf(STDERR, "Could not find input file %s\n", inname); - return 1; + return (1); } if ((fpout = fopen(outname, "wb")) == NULL) { fprintf(STDERR, "Could not open output file %s\n", outname); fclose(fpin); - return 1; + return (1); } png_debug(0, "Allocating read and write structures\n"); @@ -409,7 +409,7 @@ int test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) png_destroy_write_struct(&write_ptr, &write_info_ptr); fclose(fpin); fclose(fpout); - return 1; + return (1); } png_debug(0, "Setting jmpbuf for write struct\n"); @@ -425,7 +425,7 @@ int test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) png_destroy_write_struct(&write_ptr, &write_info_ptr); fclose(fpin); fclose(fpout); - return 1; + return (1); } #ifdef USE_FAR_KEYWORD @@ -621,7 +621,7 @@ int test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) png_destroy_write_struct(&write_ptr, &write_info_ptr); fclose(fpin); fclose(fpout); - return 1; + return (1); } num_pass = png_set_interlace_handling(read_ptr); @@ -663,14 +663,14 @@ int test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) if ((fpin = fopen(inname, "rb")) == NULL) { fprintf(STDERR, "Could not find file %s\n", inname); - return 1; + return (1); } if ((fpout = fopen(outname, "rb")) == NULL) { fprintf(STDERR, "Could not find file %s\n", outname); fclose(fpin); - return 1; + return (1); } while (1) @@ -686,7 +686,7 @@ int test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) inname, outname); fclose(fpin); fclose(fpout); - return 1; + return (1); } if (!num_in) @@ -697,14 +697,14 @@ int test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) fprintf(STDERR, "Files %s and %s are different\n", inname, outname); fclose(fpin); fclose(fpout); - return 1; + return (1); } } fclose(fpin); fclose(fpout); - return 0; + return (0); } /* input and output filenames */ @@ -867,5 +867,5 @@ main(int argc, char *argv[]) fprintf(STDERR, "libpng passes test\n"); else fprintf(STDERR, "libpng FAILS test\n"); - return ierror != 0; + return ((int)(ierror != 0)); } diff --git a/pngtrans.c b/pngtrans.c index 5d6033997..28177d29d 100644 --- a/pngtrans.c +++ b/pngtrans.c @@ -1,12 +1,12 @@ /* pngtrans.c - transforms the data in a row (used by both readers and writers) * - * libpng 0.99 + * libpng 0.99a * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. * Copyright (c) 1996, 1997 Andreas Dilger * Copyright (c) 1998, Glenn Randers-Pehrson - * January 30, 1998 + * January 31, 1998 */ #define PNG_INTERNAL @@ -77,10 +77,10 @@ png_set_interlace_handling(png_structp png_ptr) if (png_ptr->interlaced) { png_ptr->transformations |= PNG_INTERLACE; - return 7; + return (7); } - return 1; + return (1); } #endif diff --git a/pngwio.c b/pngwio.c index aca29bd32..2358a02c1 100644 --- a/pngwio.c +++ b/pngwio.c @@ -1,12 +1,12 @@ /* pngwio.c - functions for data output * - * libpng 0.99 + * libpng 0.99a * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. * Copyright (c) 1996, 1997 Andreas Dilger * Copyright (c) 1998, Glenn Randers-Pehrson - * January 30, 1998 + * January 31, 1998 * * This file provides a location for all output. Users which need * special handling are expected to write functions which have the same diff --git a/pngwrite.c b/pngwrite.c index db6c82620..d56cc426a 100644 --- a/pngwrite.c +++ b/pngwrite.c @@ -1,12 +1,12 @@ /* pngwrite.c - general routines to write a PNG file * - * libpng 0.99 + * libpng 0.99a * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. * Copyright (c) 1996, 1997 Andreas Dilger * Copyright (c) 1998, Glenn Randers-Pehrson - * January 30, 1998 + * January 31, 1998 */ /* get internal access to png.h */ @@ -249,7 +249,7 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime) ptime->year, ptime->hour % 24, ptime->minute % 60, ptime->second % 61); #endif - return png_ptr->time_buffer; + return ((png_charp)png_ptr->time_buffer); } #endif /* PNG_TIME_RFC1123_SUPPORTED */ @@ -289,7 +289,7 @@ png_create_write_struct(png_const_charp user_png_ver, voidp error_ptr, png_debug(1, "in png_create_write_struct\n"); if ((png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG)) == NULL) { - return (png_structp)NULL; + return ((png_structp)NULL); } #ifdef USE_FAR_KEYWORD if (setjmp(jmpbuf)) @@ -299,7 +299,7 @@ png_create_write_struct(png_const_charp user_png_ver, voidp error_ptr, { png_free(png_ptr, png_ptr->zbuf); png_destroy_struct(png_ptr); - return (png_structp)NULL; + return ((png_structp)NULL); } #ifdef USE_FAR_KEYWORD png_memcpy(png_ptr->jmpbuf,jmpbuf,sizeof(jmp_buf)); @@ -329,7 +329,7 @@ png_create_write_struct(png_const_charp user_png_ver, voidp error_ptr, 1, NULL, NULL); #endif - return (png_ptr); + return ((png_structp)png_ptr); } diff --git a/pngwtran.c b/pngwtran.c index dd14abc77..97886ba28 100644 --- a/pngwtran.c +++ b/pngwtran.c @@ -1,12 +1,12 @@ /* pngwtran.c - transforms the data in a row for PNG writers * - * libpng 0.99 + * libpng 0.99a * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. * Copyright (c) 1996, 1997 Andreas Dilger * Copyright (c) 1998, Glenn Randers-Pehrson - * January 30, 1998 + * January 31, 1998 */ #define PNG_INTERNAL diff --git a/pngwutil.c b/pngwutil.c index fcc7eb0d0..22f7797db 100644 --- a/pngwutil.c +++ b/pngwutil.c @@ -1,12 +1,12 @@ /* pngwutil.c - utilities to write a PNG file * - * libpng 0.99 + * libpng 0.99a * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. * Copyright (c) 1996, 1997 Andreas Dilger * Copyright (c) 1998, Glenn Randers-Pehrson - * January 30, 1998 + * January 31, 1998 */ #define PNG_INTERNAL @@ -599,7 +599,7 @@ png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key) if (key == NULL || (key_len = png_strlen(key)) == 0) { png_chunk_warning(png_ptr, "zero length keyword"); - return 0; + return ((png_size_t)0); } png_debug1(2, "Keyword to be checked is '%s'\n", key); @@ -688,7 +688,7 @@ png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key) key_len = 79; } - return key_len; + return (key_len); } #endif