On Wed, 11 May 2022 12:47:08 GMT, Jaikiran Pai <j...@openjdk.org> wrote:

>> src/java.base/share/native/libzip/zlib/gzwrite.c line 452:
>> 
>>> 450:     len = strlen(next);
>>> 451: #  else
>>> 452: #   ifdef __APPLE__ // ignore format-nonliteral warning on macOS
>> 
>> Instead of patching 3rd party code to fix a compilation warning, you should 
>> disable that warning instead.
>> 
>> In `make/modules/java.base/lib/CoreLibraries.gmk`, add 
>> 
>> DISABLED_WARNINGS_clang := format-nonliteral, \
>> 
>> as line 138.
>
> Thank you for these useful inputs Magnus. I did these changes locally but for 
> some reason this format-nonliteral is not getting picked up while building 
> that library. I will investigate and see what's going on. Will update the PR 
> once I figure it out.

I agree with Magnus and try to avoid changing the imported zlib code.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8651

Reply via email to