summaryrefslogtreecommitdiff
path: root/gdb/doublest.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-01-22 19:57:40 +0000
committerAndrew Cagney <cagney@redhat.com>2002-01-22 19:57:40 +0000
commit5f5b983a9660d66cdfe71e34c13e25852c090065 (patch)
tree20f31c13e85b54d09abca65f1fc1cf1adef076ef /gdb/doublest.c
parent1a54ac595925c4a20b554adfe1eb071b47da96c5 (diff)
downloadgdb-5f5b983a9660d66cdfe71e34c13e25852c090065.tar.gz
Initialize the TYPE_FLOATFORMAT field of the h/w floating-point
builtin types.
Diffstat (limited to 'gdb/doublest.c')
-rw-r--r--gdb/doublest.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/doublest.c b/gdb/doublest.c
index 2b606573610..93e4a7eb25f 100644
--- a/gdb/doublest.c
+++ b/gdb/doublest.c
@@ -439,7 +439,7 @@ int
floatformat_is_negative (const struct floatformat *fmt, char *val)
{
unsigned char *uval = (unsigned char *) val;
-
+ gdb_assert (fmt != NULL);
return get_field (uval, fmt->byteorder, fmt->totalsize, fmt->sign_start, 1);
}
@@ -454,6 +454,8 @@ floatformat_is_nan (const struct floatformat *fmt, char *val)
unsigned int mant_bits, mant_off;
int mant_bits_left;
+ gdb_assert (fmt != NULL);
+
if (! fmt->exp_nan)
return 0;
@@ -503,6 +505,7 @@ floatformat_mantissa (const struct floatformat *fmt, char *val)
char buf[9];
/* Make sure we have enough room to store the mantissa. */
+ gdb_assert (fmt != NULL);
gdb_assert (sizeof res > ((fmt->man_len + 7) / 8) * 2);
mant_off = fmt->man_start;