diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 47c68cbde03..bd74aa55e5b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-11-24 Joel Brobecker + + * unittests/gmp-utils-selftests.c (write_fp_test): Use mpq_set_si + instead of mpq_set_ui to initialize our GMP rational. + 2020-11-23 Tom de Vries * debuginfod-support.c (debuginfod_source_query) diff --git a/gdb/unittests/gmp-utils-selftests.c b/gdb/unittests/gmp-utils-selftests.c index af5bc65d2f9..175ab3f9827 100644 --- a/gdb/unittests/gmp-utils-selftests.c +++ b/gdb/unittests/gmp-utils-selftests.c @@ -400,7 +400,7 @@ write_fp_test (int numerator, unsigned int denominator, memset (buf, 0, len); gdb_mpq v; - mpq_set_ui (v.val, numerator, denominator); + mpq_set_si (v.val, numerator, denominator); mpq_canonicalize (v.val); v.write_fixed_point (buf, len, byte_order, 0, scaling_factor);