This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] Remove new lines at end of messages


  I added yesterday gettext to the list of 
categories that are displayed on ARI web page:
http://sourceware.org/gdb/current/ari/

  The patch below fixes the 14 occurrences of
"trailing new line" rule, which says that:
A message should not have a trailing new line.


OK to apply?


Pierre Muller
as ARI maintainer

2011-03-16  Pierre Muller  <muller@ics.u-strasbg.fr>

	Fix ARI warnings about new lines at the end of messages, which
	are unneeded as there is a new line added at the end of the message
	automatically.
	* darwin-nat.c (darwin_stop_inferior): Ditto.
	* dec-thread.c (dec_thread_get_ada_task_ptid): Ditto.
	* dfp.c (decimal_to_number): Ditto.
	* exec.c (print_section_info): Ditto.
	* i386-darwin-nat.c (darwin_set_sstep): Ditto.
	* osdata.c (get_osdata): Ditto.
	* record.c (bfdcore_write): Ditto.
	* remote-mips.c (mips_readchar): Ditto.
	* remote.c (read_ptid): Ditto.
	* ser-mingw.c (ser_windows_raw): Ditto.
	* tracepoint.c (add_local_symbols): Ditto.
	* windows-nat.c (fake_create_process): Ditto.


Index: darwin-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/darwin-nat.c,v
retrieving revision 1.22
diff -u -p -r1.22 darwin-nat.c
--- darwin-nat.c	7 Jan 2011 19:36:15 -0000	1.22
+++ darwin-nat.c	16 Mar 2011 10:50:30 -0000
@@ -1236,7 +1236,7 @@ darwin_stop_inferior (struct inferior *i
 
   res = kill (inf->pid, SIGSTOP);
   if (res != 0)
-    warning (_("cannot kill: %s\n"), safe_strerror (errno));
+    warning (_("cannot kill: %s"), safe_strerror (errno));
 
   /* Wait until the process is really stopped.  */
   while (1)
Index: dec-thread.c
===================================================================
RCS file: /cvs/src/src/gdb/dec-thread.c,v
retrieving revision 1.13
diff -u -p -r1.13 dec-thread.c
--- dec-thread.c	7 Jan 2011 19:36:15 -0000	1.13
+++ dec-thread.c	16 Mar 2011 10:50:30 -0000
@@ -700,7 +700,7 @@ dec_thread_get_ada_task_ptid (long lwp, 
     if (info->info.teb == (pthread_t) thread)
       return ptid_build_from_info (*info);
   
-  warning (_("Could not find thread id from THREAD = 0x%lx\n"), thread);
+  warning (_("Could not find thread id from THREAD = 0x%lx"), thread);
   return inferior_ptid;
 }
 
Index: dfp.c
===================================================================
RCS file: /cvs/src/src/gdb/dfp.c,v
retrieving revision 1.14
diff -u -p -r1.14 dfp.c
--- dfp.c	5 Jan 2011 22:22:48 -0000	1.14
+++ dfp.c	16 Mar 2011 10:50:30 -0000
@@ -134,7 +134,7 @@ decimal_to_number (const gdb_byte *from,
 	decimal128ToNumber ((decimal128 *) from, to);
 	break;
       default:
-	error (_("Unknown decimal floating point type.\n"));
+	error (_("Unknown decimal floating point type."));
 	break;
     }
 }
Index: exec.c
===================================================================
RCS file: /cvs/src/src/gdb/exec.c,v
retrieving revision 1.105
diff -u -p -r1.105 exec.c
--- exec.c	14 Feb 2011 22:08:48 -0000	1.105
+++ exec.c	16 Mar 2011 10:50:31 -0000
@@ -728,7 +728,7 @@ print_section_info (struct target_sectio
 	    }
 	}
       if (p == t->sections_end)
-	warning (_("Cannot find section for the entry point of %s.\n"),
+	warning (_("Cannot find section for the entry point of %s."),
 		 bfd_get_filename (abfd));
 
       entry_point = gdbarch_addr_bits_remove (gdbarch, 
Index: i386-darwin-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-darwin-nat.c,v
retrieving revision 1.11
diff -u -p -r1.11 i386-darwin-nat.c
--- i386-darwin-nat.c	9 Jan 2011 03:08:56 -0000	1.11
+++ i386-darwin-nat.c	16 Mar 2011 10:50:31 -0000
@@ -581,7 +581,7 @@ darwin_set_sstep (thread_t thread, int e
       break;
 #endif
     default:
-      error (_("darwin_set_sstep: unknown flavour: %d\n"),
regs.tsh.flavor);
+      error (_("darwin_set_sstep: unknown flavour: %d"), regs.tsh.flavor);
     }
 }
 
Index: osdata.c
===================================================================
RCS file: /cvs/src/src/gdb/osdata.c,v
retrieving revision 1.10
diff -u -p -r1.10 osdata.c
--- osdata.c	2 Feb 2011 16:12:58 -0000	1.10
+++ osdata.c	16 Mar 2011 10:50:31 -0000
@@ -267,7 +267,7 @@ get_osdata (const char *type)
     }
 
   if (!osdata)
-    error (_("Can not fetch data now.\n"));
+    error (_("Can not fetch data now."));
 
   return osdata;
 }
Index: record.c
===================================================================
RCS file: /cvs/src/src/gdb/record.c,v
retrieving revision 1.60
diff -u -p -r1.60 record.c
--- record.c	7 Mar 2011 15:58:13 -0000	1.60
+++ record.c	16 Mar 2011 10:50:32 -0000
@@ -2373,7 +2373,7 @@ bfdcore_write (bfd *obfd, asection *osec
   if (ret)
     *offset += len;
   else
-    error (_("Failed to write %d bytes to core file %s ('%s').\n"),
+    error (_("Failed to write %d bytes to core file %s ('%s')."),
 	   len, bfd_get_filename (obfd),
 	   bfd_errmsg (bfd_get_error ()));
 }
Index: remote-mips.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-mips.c,v
retrieving revision 1.119
diff -u -p -r1.119 remote-mips.c
--- remote-mips.c	26 Jan 2011 23:13:22 -0000	1.119
+++ remote-mips.c	16 Mar 2011 10:50:33 -0000
@@ -672,7 +672,7 @@ mips_readchar (int timeout)
   if (ch == SERIAL_TIMEOUT && timeout == -1)	/* Watchdog went off.  */
     {
       target_mourn_inferior ();
-      error (_("Watchdog has expired.  Target detached.\n"));
+      error (_("Watchdog has expired.  Target detached."));
     }
 
   if (ch == SERIAL_EOF)
Index: remote.c
===================================================================
RCS file: /cvs/src/src/gdb/remote.c,v
retrieving revision 1.439
diff -u -p -r1.439 remote.c
--- remote.c	14 Mar 2011 15:43:50 -0000	1.439
+++ remote.c	16 Mar 2011 10:50:36 -0000
@@ -1876,7 +1876,7 @@ read_ptid (char *buf, char **obuf)
       /* Multi-process ptid.  */
       pp = unpack_varlen_hex (p + 1, &pid);
       if (*pp != '.')
-	error (_("invalid remote ptid: %s\n"), p);
+	error (_("invalid remote ptid: %s"), p);
 
       p = pp;
       pp = unpack_varlen_hex (p + 1, &tid);
Index: ser-mingw.c
===================================================================
RCS file: /cvs/src/src/gdb/ser-mingw.c,v
retrieving revision 1.29
diff -u -p -r1.29 ser-mingw.c
--- ser-mingw.c	4 Mar 2011 19:23:42 -0000	1.29
+++ ser-mingw.c	16 Mar 2011 10:50:36 -0000
@@ -172,7 +172,7 @@ ser_windows_raw (struct serial *scb)
   scb->current_timeout = 0;
 
   if (SetCommState (h, &state) == 0)
-    warning (_("SetCommState failed\n"));
+    warning (_("SetCommState failed"));
 }
 
 static int
Index: tracepoint.c
===================================================================
RCS file: /cvs/src/src/gdb/tracepoint.c,v
retrieving revision 1.217
diff -u -p -r1.217 tracepoint.c
--- tracepoint.c	14 Mar 2011 15:43:50 -0000	1.217
+++ tracepoint.c	16 Mar 2011 10:50:37 -0000
@@ -1124,7 +1124,7 @@ add_local_symbols (struct collection_lis
       block = block_for_pc (pc);
       if (block == NULL)
 	{
-	  warning (_("Can't collect args; no symbol table info
available.\n"));
+	  warning (_("Can't collect args; no symbol table info
available."));
 	  return;
 	}
 
Index: windows-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/windows-nat.c,v
retrieving revision 1.213
diff -u -p -r1.213 windows-nat.c
--- windows-nat.c	12 Jan 2011 01:23:29 -0000	1.213
+++ windows-nat.c	16 Mar 2011 10:50:38 -0000
@@ -1289,7 +1289,7 @@ fake_create_process (void)
     open_process_used = 1;
   else
     {
-      error (_("OpenProcess call failed, GetLastError = %lud\n"),
+      error (_("OpenProcess call failed, GetLastError = %lud"),
        GetLastError ());
       /*  We can not debug anything in that case.  */
     }



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]