Minor write bug-fixes, remove unimplemented code

A debug() assert fired if windowBits was set to 8 for the Huffman only and
no-compression cases.  This commit changes it to do some extra checking.  Remove
unreachable code in pz_default_settings, eliminate a spurious warning in pngcp
for small files.

Signed-off-by: John Bowler <jbowler@acm.org>
This commit is contained in:
John Bowler
2016-05-06 14:35:35 -07:00
parent e966fac5ac
commit 4cc89fb733
4 changed files with 70 additions and 168 deletions

7
png.h
View File

@@ -1226,11 +1226,12 @@ PNG_EXPORT(241, int, png_convert_to_rfc1123_buffer, (char out[29],
#ifdef PNG_CONVERT_tIME_SUPPORTED
/* Convert from a struct tm to png_time */
PNG_EXPORT(24, void, png_convert_from_struct_tm, (png_timep ptime,
const struct tm * ttime));
PNG_EXPORT(24, PNG_DEPRECATED void, png_convert_from_struct_tm,
(png_timep ptime, const struct tm * ttime));
/* Convert from time_t to png_time. Uses gmtime() */
PNG_EXPORT(25, void, png_convert_from_time_t, (png_timep ptime, time_t ttime));
PNG_EXPORT(25, PNG_DEPRECATED void, png_convert_from_time_t, (png_timep ptime,
time_t ttime));
#endif /* CONVERT_tIME */
#ifdef PNG_READ_EXPAND_SUPPORTED