RFR: 8266173: -Wmaybe-uninitialized happens in jni_util.c
David Holmes
dholmes at openjdk.java.net
Wed Apr 28 12:45:49 UTC 2021
On Wed, 28 Apr 2021 01:20:24 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:
> We can see compiler warnings in jni_util.c as following on GCC 11. `buf` should be initialized.
Seems ok.
src/java.base/share/native/libjava/jni_util.c line 465:
> 463: {
> 464: int len = (int)strlen(str);
> 465: jchar buf[512] = {0};
Seems harmless, but a spurious warning - which is to be expected I guess since the flag says "maybe".
-------------
Marked as reviewed by dholmes (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/3742
More information about the core-libs-dev
mailing list