Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Borland C++ 5.5.1/5.82 warnings #4

Closed
vszakats opened this issue Apr 1, 2015 · 8 comments
Closed

Borland C++ 5.5.1/5.82 warnings #4

vszakats opened this issue Apr 1, 2015 · 8 comments

Comments

@vszakats
Copy link
Contributor

vszakats commented Apr 1, 2015

Build configuration: -DPNG_NO_STDIO, -DUNICODE and disabled PNG_CONSOLE_IO_SUPPORTED, PNG_CONVERT_tIME_SUPPORTED

Warning W8004 png.c 724: 'pos' is assigned a value that is never used in function png_convert_to_rfc1123_buffer
Warning W8012 png.c 2279: Comparing signed and unsigned values in function png_compare_ICC_profile_with_sRGB
Warning W8004 png.c 3146: 'size' is assigned a value that is never used in function png_ascii_from_fixed
Warning W8008 pngmem.c 80: Condition is always true in function png_malloc_base
Warning W8004 pngpread.c 593: 'old_buffer' is assigned a value that is never used in function png_push_save_buffer
Warning W8012 pngrtran.c 4463: Comparing signed and unsigned values in function png_do_expand
Warning W8012 pngrtran.c 4481: Comparing signed and unsigned values in function png_do_expand
Warning W8004 pngrutil.c 673: 'text' is assigned a value that is never used in function png_decompress_chunk
Warning W8012 pngrutil.c 1820: Comparing signed and unsigned values in function png_handle_tRNS
Warning W8012 pngrutil.c 1983: Comparing signed and unsigned values in function png_handle_hIST
Warning W8004 pngset.c 676: 'new_iccp_name' is assigned a value that is never used in function png_set_iCCP
Warning W8008 pngset.c 1525: Condition is always false in function png_set_compression_buffer_size
Warning W8066 pngset.c 1527: Unreachable code in function png_set_compression_buffer_size
Warning W8084 pngtrans.c 707: Suggest parentheses to clarify precedence in function png_do_check_palette_indexes
Warning W8004 pngwtran.c 487: 'dp' is assigned a value that is never used in function png_do_write_invert_alpha
Warning W8004 pngwtran.c 449: 'dp' is assigned a value that is never used in function png_do_write_invert_alpha
Warning W8004 pngwtran.c 425: 'dp' is assigned a value that is never used in function png_do_write_invert_alpha
@glennrp
Copy link
Contributor

glennrp commented Apr 1, 2015

Thanks for the report.

Glenn

On Wed, Apr 1, 2015 at 10:55 AM, Viktor Szakáts notifications@github.com
wrote:

Build configuration: -DPNG_NO_STDIO, -DUNICODE and disabled
PNG_CONSOLE_IO_SUPPORTED, PNG_CONVERT_tIME_SUPPORTED

Warning W8004 png.c 724: 'pos' is assigned a value that is never used in function png_convert_to_rfc1123_buffer
Warning W8012 png.c 2279: Comparing signed and unsigned values in function png_compare_ICC_profile_with_sRGB
Warning W8004 png.c 3146: 'size' is assigned a value that is never used in function png_ascii_from_fixed
Warning W8008 pngmem.c 80: Condition is always true in function png_malloc_base
Warning W8004 pngpread.c 593: 'old_buffer' is assigned a value that is never used in function png_push_save_buffer
Warning W8012 pngrtran.c 4463: Comparing signed and unsigned values in function png_do_expand
Warning W8012 pngrtran.c 4481: Comparing signed and unsigned values in function png_do_expand
Warning W8004 pngrutil.c 673: 'text' is assigned a value that is never used in function png_decompress_chunk
Warning W8012 pngrutil.c 1820: Comparing signed and unsigned values in function png_handle_tRNS
Warning W8012 pngrutil.c 1983: Comparing signed and unsigned values in function png_handle_hIST
Warning W8004 pngset.c 676: 'new_iccp_name' is assigned a value that is never used in function png_set_iCCP
Warning W8008 pngset.c 1525: Condition is always false in function png_set_compression_buffer_size
Warning W8066 pngset.c 1527: Unreachable code in function png_set_compression_buffer_size
Warning W8084 pngtrans.c 707: Suggest parentheses to clarify precedence in function png_do_check_palette_indexes
Warning W8004 pngwtran.c 487: 'dp' is assigned a value that is never used in function png_do_write_invert_alpha
Warning W8004 pngwtran.c 449: 'dp' is assigned a value that is never used in function png_do_write_invert_alpha
Warning W8004 pngwtran.c 425: 'dp' is assigned a value that is never used in function png_do_write_invert_alpha


Reply to this email directly or view it on GitHub
#4.

@vszakats
Copy link
Contributor Author

vszakats commented Apr 1, 2015

Hello Glenn, you're welcome.

@vszakats
Copy link
Contributor Author

An updated list after 1.6.18:

Warning W8004 ../../../png.c 724: 'pos' is assigned a value that is never used in function png_convert_to_rfc1123_buffer
Warning W8004 ../../../png.c 3147: 'size' is assigned a value that is never used in function png_ascii_from_fixed
Warning W8008 ../../../pngmem.c 83: Condition is always true in function png_malloc_base
Warning W8012 ../../../pngrutil.c 1821: Comparing signed and unsigned values in function png_handle_tRNS
Warning W8012 ../../../pngrutil.c 1985: Comparing signed and unsigned values in function png_handle_hIST
Warning W8008 ../../../pngset.c 1527: Condition is always false in function png_set_compression_buffer_size
Warning W8008 ../../../pngset.c 1527: Condition is always false in function png_set_compression_buffer_size
Warning W8066 ../../../pngset.c 1529: Unreachable code in function png_set_compression_buffer_size
Warning W8004 ../../../pngwutil.c 2654: 'mins' is assigned a value that is never used in function png_write_find_filter

@glennrp
Copy link
Contributor

glennrp commented Jul 28, 2015

Thanks again. I'll take a look.

@glennrp
Copy link
Contributor

glennrp commented Jul 29, 2015

Fix pushed to libpng16 branch. The warnings in pngmem.c and pngset.c are unavoidable, where we are testing for potential overflow, and there are comments to explain those.

@vszakats
Copy link
Contributor Author

Thanks a lot @glennrp. No problem with those. If you think so we can close this Issue.

(disclaimer: I'm not actually using Borland C++, but it still has some (well: one) unique warning and it is a popular option in an OSS project I contribute to and where libpng is used. That's the reason I brought it up.)

@glennrp
Copy link
Contributor

glennrp commented Jul 30, 2015

OK. But libpng-1.6.19 probably won't be out for a few months or more.

@glennrp glennrp closed this as completed Jul 30, 2015
@vszakats
Copy link
Contributor Author

Time is not an issue. Many thanks for you work on libpng!

GerHobbelt pushed a commit to GerHobbelt/libpng that referenced this issue Mar 20, 2021
mathieumallet pushed a commit to YOU-i-Labs/libpng that referenced this issue Aug 10, 2021
BlazesRus pushed a commit to BlazesRus/libpng that referenced this issue May 6, 2022
Replace zlib with zlib-tsc-package 1.2.11.1
GerHobbelt pushed a commit to GerHobbelt/libpng that referenced this issue Mar 20, 2024
* premake: Use _PLATFORM booleans to clean up platform checks

* premake: Remove all winuwp arm configurations as it is deprecated

* premake: Add cocoa configurations or remove unneeded mobile configurations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants