RFR: 8319165: hsdis binutils: warns on empty string as option string
Robbin Ehn
rehn at openjdk.org
Wed Nov 1 08:31:02 UTC 2023
On Tue, 31 Oct 2023 14:21:02 GMT, Hamlin Li <mli at openjdk.org> wrote:
>> Hi, please consider.
>>
>> insn_options[0] is set to empty string if there is no options (NULL or empty strings).
>> Checking it for empty string should cover both cases, caller option is NULL or caller option is empty string.
>>
>> Tested hsdis no longer gives me the warning.
>
> src/utils/hsdis/binutils/hsdis-binutils.c line 340:
>
>> 338: native_bfd,
>> 339: /* On some archs we get warnings, if we pass empty options */
>> 340: (app_data->insn_options[0] == '\0') ? NULL : app_data->insn_options);
>
> Looks good, but to me, it's more clear to keep `caller_options == NULL` too.
Sure, since this was not obvious.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16433#discussion_r1378516459
More information about the build-dev
mailing list