diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4158161393..147882447e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2019-09-12 Andrew Burgess + + * maint.c (maint_print_section_data::maint_print_section_data): + Force use of 'float log10 (float)' by casting the argument to + float. + 2019-09-12 Andrew Burgess * maint.c: Add 'cmath' include. diff --git a/gdb/maint.c b/gdb/maint.c index 286ec31013..1a621a1719 100644 --- a/gdb/maint.c +++ b/gdb/maint.c @@ -301,7 +301,7 @@ struct maint_print_section_data arg(arg) { int section_count = gdb_bfd_count_sections (abfd); - index_digits = ((int) log10 (section_count)) + 1; + index_digits = ((int) log10 ((float) section_count)) + 1; } private: