mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Remove unused function from write-only configurations
`png_icc_profile_error` is no longer used when writing iCCP chunks, therefore it can be compiled out when the reading is disabled. This change includes two `minconfig` files to test read-only and write-only "full" configurations, to supplement the existing tests for "minimal" configurations. Signed-off-by: John Bowler <jbowler@acm.org> Signed-off-by: Cosmin Truta <ctruta@gmail.com>
This commit is contained in:
parent
f2b0f5fe1c
commit
98448e372d
13
contrib/conftest/read-full.dfa
Normal file
13
contrib/conftest/read-full.dfa
Normal file
@ -0,0 +1,13 @@
|
||||
# read-full.dfa
|
||||
# Build time configuration of libpng
|
||||
#
|
||||
# Author: John Bowler
|
||||
# Copyright: (c) John Bowler, 2025
|
||||
# Usage rights:
|
||||
# To the extent possible under law, the author has waived all copyright and
|
||||
# related or neighboring rights to this work. This work is published from:
|
||||
# United States.
|
||||
#
|
||||
# Build libpng with no write support and full read support.
|
||||
#
|
||||
option WRITE off
|
13
contrib/conftest/write-full.dfa
Normal file
13
contrib/conftest/write-full.dfa
Normal file
@ -0,0 +1,13 @@
|
||||
# write-full.dfa
|
||||
# Build time configuration of libpng
|
||||
#
|
||||
# Author: John Bowler
|
||||
# Copyright: (c) John Bowler, 2025
|
||||
# Usage rights:
|
||||
# To the extent possible under law, the author has waived all copyright and
|
||||
# related or neighboring rights to this work. This work is published from:
|
||||
# United States.
|
||||
#
|
||||
# Build libpng with no read support and full write support.
|
||||
#
|
||||
option READ off
|
4
png.c
4
png.c
@ -1491,7 +1491,7 @@ png_XYZ_from_xy(png_XYZ *XYZ, const png_xy *xy)
|
||||
}
|
||||
#endif /* COLORSPACE */
|
||||
|
||||
#ifdef PNG_iCCP_SUPPORTED
|
||||
#ifdef PNG_READ_iCCP_SUPPORTED
|
||||
/* Error message generation */
|
||||
static char
|
||||
png_icc_tag_char(png_uint_32 byte)
|
||||
@ -1567,9 +1567,7 @@ png_icc_profile_error(png_const_structrp png_ptr, png_const_charp name,
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* iCCP */
|
||||
|
||||
#ifdef PNG_READ_iCCP_SUPPORTED
|
||||
/* Encoded value of D50 as an ICC XYZNumber. From the ICC 2010 spec the value
|
||||
* is XYZ(0.9642,1.0,0.8249), which scales to:
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user