aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/ada-typeprint.c2
-rw-r--r--gdb/value.c4
3 files changed, 9 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ad74df6..bf7937f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2016-04-14 Pedro Alves <palves@redhat.com>
+
+ * 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 <lgustavo@codesourcery.com>
* exec.c (exec_file_locate_attach): Guard a couple functions
diff --git a/gdb/ada-typeprint.c b/gdb/ada-typeprint.c
index 065fbd3..d7a8360 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 5aeed02..9657b89 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: