Skip to content

Commit c146685

Browse files
committedNov 6, 2023
8319165: hsdis binutils: warns on empty string as option string
Reviewed-by: mli, jwilhelm, aph
1 parent 01c0d5d commit c146685

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎src/utils/hsdis/binutils/hsdis-binutils.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,9 @@ static void setup_app_data(struct hsdis_app_data* app_data,
336336
app_data->printf_stream,
337337
app_data->printf_callback,
338338
native_bfd,
339-
/* On PowerPC we get warnings, if we pass empty options */
340-
(caller_options == NULL) ? NULL : app_data->insn_options);
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);
341342

342343
/* Finish linking together the various callback blocks. */
343344
app_data->dinfo.application_data = (void*) app_data;

0 commit comments

Comments
 (0)
Please sign in to comment.