RFR: 8319165: hsdis binutils: warns on empty string as option string [v2]

Andrew Haley aph at openjdk.org
Thu Nov 2 09:26:03 UTC 2023


On Wed, 1 Nov 2023 11:52:20 GMT, Robbin Ehn <rehn 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.
>
> Robbin Ehn has updated the pull request incrementally with one additional commit since the last revision:
> 
>   More clear

Marked as reviewed by aph (Reviewer).

src/utils/hsdis/binutils/hsdis-binutils.c line 341:

> 339:                                  /* On some archs we get warnings, if we pass empty options */
> 340:                                  ((caller_options == NULL) || (app_data->insn_options[0] == '\0'))
> 341:                                  ? NULL : app_data->insn_options);

Suggestion:

                                 ((caller_options == NULL) || (app_data->insn_options[0] == '\0'))
                                   ? NULL : app_data->insn_options);

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

PR Review: https://git.openjdk.org/jdk/pull/16433#pullrequestreview-1709786302
PR Review Comment: https://git.openjdk.org/jdk/pull/16433#discussion_r1379808253


More information about the build-dev mailing list