Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Thiago Jung Bauermann <bauerman@br.ibm.com>
To: gdb-patches <gdb-patches@sourceware.org>
Subject: [commit/obvious] minor fixes in DFP code
Date: Tue, 27 Nov 2007 20:16:00 -0000	[thread overview]
Message-ID: <1196194552.6746.132.camel@localhost.localdomain> (raw)

[-- Attachment #1: Type: text/plain, Size: 188 bytes --]

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

[-- Attachment #2: dfp-obvious.diff --]
[-- Type: text/x-patch, Size: 2114 bytes --]

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);

                 reply	other threads:[~2007-11-27 20:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1196194552.6746.132.camel@localhost.localdomain \
    --to=bauerman@br.ibm.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox