8319165: hsdis binutils: warns on empty string as option string

Reviewed-by: mli, jwilhelm, aph
This commit is contained in:
Robbin Ehn 2023-11-06 05:48:10 +00:00
parent 01c0d5dd0a
commit c146685ca9

View File

@ -336,8 +336,9 @@ static void setup_app_data(struct hsdis_app_data* app_data,
app_data->printf_stream,
app_data->printf_callback,
native_bfd,
/* On PowerPC we get warnings, if we pass empty options */
(caller_options == NULL) ? NULL : app_data->insn_options);
/* On some archs we get warnings, if we pass empty options */
((caller_options == NULL) || (app_data->insn_options[0] == '\0'))
? NULL : app_data->insn_options);
/* Finish linking together the various callback blocks. */
app_data->dinfo.application_data = (void*) app_data;