This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit/obvious] minor fixes in DFP code
- From: Thiago Jung Bauermann <bauerman at br dot ibm dot com>
- To: gdb-patches <gdb-patches at sourceware dot org>
- Date: Tue, 27 Nov 2007 18:15:52 -0200
- Subject: [commit/obvious] minor fixes in DFP code
Hi,
Just commited the following minor fixes which slipped through in the
Decimal Floating Point support code.
--
[]'s
Thiago Jung Bauermann
Software Engineer
IBM Linux Technology Center
2007-11-27 Thiago Jung Bauermann <bauerman@br.ibm.com>
* dfp.c (decimal_from_string): Remove superfluous newline from
error string.
(decimal_to_string): Likewise.
* printcmd.c (printf_command): Change string buffer to use
MAX_DECIMAL_STRING constant.
* value.c (value_from_decfloat): Likewise.
Index: dfp.c
===================================================================
RCS file: /cvs/src/src/gdb/dfp.c,v
retrieving revision 1.1
diff -u -r1.1 dfp.c
--- dfp.c 25 Oct 2007 17:52:31 -0000 1.1
+++ dfp.c 27 Nov 2007 20:01:45 -0000
@@ -71,7 +71,7 @@
decimal128ToString ((decimal128 *) dec, s);
break;
default:
- error (_("Unknown decimal floating point type.\n"));
+ error (_("Unknown decimal floating point type."));
break;
}
}
@@ -103,7 +103,7 @@
decimal128FromString ((decimal128 *) dec, string, &set);
break;
default:
- error (_("Unknown decimal floating point type.\n"));
+ error (_("Unknown decimal floating point type."));
break;
}
Index: printcmd.c
===================================================================
RCS file: /cvs/src/src/gdb/printcmd.c,v
retrieving revision 1.112
diff -u -r1.112 printcmd.c
--- printcmd.c 5 Nov 2007 11:32:31 -0000 1.112
+++ printcmd.c 27 Nov 2007 20:01:45 -0000
@@ -2128,7 +2128,7 @@
case decfloat_arg:
{
char *eos;
- char decstr[128];
+ char decstr[MAX_DECIMAL_STRING];
unsigned int dfp_len = TYPE_LENGTH (value_type (val_args[i]));
unsigned char *dfp_value_ptr = (unsigned char *) value_contents_all (val_args[i])
+ value_offset (val_args[i]);
Index: value.c
===================================================================
RCS file: /cvs/src/src/gdb/value.c,v
retrieving revision 1.52
diff -u -r1.52 value.c
--- value.c 25 Oct 2007 18:01:58 -0000 1.52
+++ value.c 27 Nov 2007 20:01:45 -0000
@@ -1652,7 +1652,7 @@
if (expect_type)
{
int expect_len = TYPE_LENGTH (expect_type);
- char decstr[128];
+ char decstr[MAX_DECIMAL_STRING];
int real_len;
decimal_to_string (decbytes, len, decstr);