HaxeFoundation / hxcpp

Runtime files for c++ backend for haxe
Other
295 stars 184 forks source link

Fix deprecated non-prototype warnings in Zlib for non-MSVC compilers. #1144

Closed MAJigsaw77 closed 2 weeks ago

MAJigsaw77 commented 2 weeks ago

This PR adds the -Wno-deprecated-non-prototype compiler flag to the Zlib build process for non-MSVC compilers. The purpose of this change is to remove warnings related to deprecated non-prototype function definitions.

MAJigsaw77 commented 2 weeks ago

Once hxcpp starts using zlib 1.3 this change can be removed as mentioned here

hughsando commented 2 weeks ago

This flag itself causes warnings when clang is older (<15 ?). This could be countered with <compilerflag value="-Wno-unknown-warning-option" unless="MSVC_VER" /> It may also need <compilerflag value="-Wno-unknown-warning" unless="MSVC_VER" /> for gcc. Not a bad solution, but upgrading zlib may be better.

MAJigsaw77 commented 2 weeks ago

This flag itself causes warnings when clang is older (<15 ?). This could be countered with <compilerflag value="-Wno-unknown-warning-option" unless="MSVC_VER" /> It may also need <compilerflag value="-Wno-unknown-warning" unless="MSVC_VER" /> for gcc. Not a bad solution, but upgrading zlib may be better.

I'll add <compilerflag value="-Wno-unknown-warning" unless="MSVC_VER" /> in any case.

hughsando commented 2 weeks ago

We will see how this goes for now, and think about zlib updates. Thanks!