diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ad74df6771..bf7937fda7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2016-04-14 Pedro Alves + + * ada-typeprint.c (print_fixed_point_type): Don't pass float as + argument to function expecting LONGEST. + * value.c (unpack_long): Add casts to LONGEST. + 2016-04-13 Luis Machado * exec.c (exec_file_locate_attach): Guard a couple functions diff --git a/gdb/ada-typeprint.c b/gdb/ada-typeprint.c index 065fbd357c..d7a8360312 100644 --- a/gdb/ada-typeprint.c +++ b/gdb/ada-typeprint.c @@ -363,7 +363,7 @@ static void print_fixed_point_type (struct type *type, struct ui_file *stream) { DOUBLEST delta = ada_delta (type); - DOUBLEST small = ada_fixed_to_float (type, 1.0); + DOUBLEST small = ada_fixed_to_float (type, 1); if (delta < 0.0) fprintf_filtered (stream, "delta ??"); diff --git a/gdb/value.c b/gdb/value.c index 5aeed02e06..9657b89870 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -2914,12 +2914,12 @@ unpack_long (struct type *type, const gdb_byte *valaddr) return extract_signed_integer (valaddr, len, byte_order); case TYPE_CODE_FLT: - return extract_typed_floating (valaddr, type); + return (LONGEST) extract_typed_floating (valaddr, type); case TYPE_CODE_DECFLOAT: /* libdecnumber has a function to convert from decimal to integer, but it doesn't work when the decimal number has a fractional part. */ - return decimal_to_doublest (valaddr, len, byte_order); + return (LONGEST) decimal_to_doublest (valaddr, len, byte_order); case TYPE_CODE_PTR: case TYPE_CODE_REF: