RFR: 8286562: GCC 12 reports some compiler warnings [v2]
Kim Barrett
kbarrett at openjdk.java.net
Wed May 11 14:31:02 UTC 2022
On Wed, 11 May 2022 13:56:44 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Avoid pragma error in before GCC 12
>
> src/java.base/share/native/libjli/java.c line 1629:
>
>> 1627: const char *arg = jargv[i];
>> 1628: if (arg[0] == '-' && arg[1] == 'J') {
>> 1629: *nargv++ = (arg[2] == '\0') ? NULL : JLI_StringDup(arg + 2);
>
> Wow!
I wonder if the client expects NULL strings in the result, or if the NULL value should be an empty string? If empty strings are okay, this would be simpler without the conditional, just dup from arg + 2 to the terminating byte (which might be immediate).
-------------
PR: https://git.openjdk.java.net/jdk/pull/8646
More information about the build-dev
mailing list