-----Original Message-----
From: Erik Joelsson <erik.joels...@oracle.com>
Sent: Mittwoch, 10. Oktober 2018 17:33
To: Baesken, Matthias <matthias.baes...@sap.com>; 'build-
d...@openjdk.java.net' <build-dev@openjdk.java.net>
Subject: Re: gcc 7.3.1 build - warnings as errors in harfbuzz
In this case, disabling the warning seems like the right thing to do.
/Erik
On 2018-10-10 06:14, Baesken, Matthias wrote:
Hello , when compiling jdk/jdk with gcc 7.3.1 on linux x86_64 (or also
on linux ppc64) I run into this build error :
/open_jdk/jdk_just_clone/jdk/src/java.desktop/share/native/libfontmanag
er/harfbuzz/hb-common.cc: In function 'void
hb_variation_to_string(hb_variation_t*, char*, unsigned int)':
/open_jdk/jdk_just_clone/jdk/src/java.desktop/share/native/libfontmanag
er/harfbuzz/hb-common.cc:1066:27: error: '%g' directive output between 1
and 18446744073709551615 bytes may cause result to exceed 'INT_MAX' [-
Werror=format-truncation=]
len += MAX (0, snprintf (s + len, ARRAY_LENGTH (s) - len, "%g", variation-
value));
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~
/open_jdk/jdk_just_clone/jdk/src/java.desktop/share/native/libfontmanag
er/harfbuzz/hb-common.cc:1066:27: note: assuming directive output of
2147488582 bytes
cc1plus: all warnings being treated as errors
(build is a product - build)
Setting –disable-warnings-as-errors works as a workaround , but of
course this is not really what we want to do .
Fixing in the harfbuzz sources in OpenJDk might be also not so nice
because it would clash with imports of new versions of harfbuzz .
Do you think we could disable the specific warning for the library
compilation ?
Any other great suggestions đŸ˜‰ ?
Thanks, Matthias