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]

[commit] fix ARI warnings


Some warnings that popped up after my recent commit.

2011-01-07  Michael Snyder  <msnyder@vmware.com>

	* mi/mi-cmd-disas.c (mi_cmd_disassemble): Mark up error message
	for i18n.
	* tui/tui-layout.c (tui_set_layout_for_display_command): 
	Split line so that operator goes to beginning of line.
	* tui/tui-winsource.c (tui_horizontal_source_scroll): Move
	assignment out of if statement.

Index: mi/mi-cmd-disas.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-cmd-disas.c,v
retrieving revision 1.35
diff -u -p -r1.35 mi-cmd-disas.c
--- mi/mi-cmd-disas.c	6 Jan 2011 00:57:02 -0000	1.35
+++ mi/mi-cmd-disas.c	7 Jan 2011 20:20:41 -0000
@@ -128,12 +128,12 @@ mi_cmd_disassemble (char *command, char 
   if (!((line_seen && file_seen && num_seen && !start_seen && !end_seen)
 	|| (line_seen && file_seen && !num_seen && !start_seen && !end_seen)
 	|| (!line_seen && !file_seen && !num_seen && start_seen && end_seen)))
-    error ("mi_cmd_disassemble: Usage: ( [-f filename -l linenum [-n "
-	   "howmany]] | [-s startaddr -e endaddr]) [--] mixed_mode.");
+    error (_("mi_cmd_disassemble: Usage: ( [-f filename -l linenum [-n "
+	     "howmany]] | [-s startaddr -e endaddr]) [--] mixed_mode."));
 
   if (argc != 1)
-    error ("mi_cmd_disassemble: Usage: [-f filename -l "
-	   "linenum [-n howmany]] [-s startaddr -e endaddr] [--] mixed_mode.");
+    error (_("mi_cmd_disassemble: Usage: [-f filename -l linenum "
+	     "[-n howmany]] [-s startaddr -e endaddr] [--] mixed_mode."));
 
   mixed_source_and_assembly = atoi (argv[0]);
   if ((mixed_source_and_assembly != 0) && (mixed_source_and_assembly != 1))
Index: tui/tui-layout.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-layout.c,v
retrieving revision 1.39
diff -u -p -r1.39 tui-layout.c
--- tui/tui-layout.c	6 Jan 2011 00:57:05 -0000	1.39
+++ tui/tui-layout.c	7 Jan 2011 20:20:41 -0000
@@ -488,8 +488,8 @@ tui_set_layout_for_display_command (cons
 		{
 		  if (TUI_DATA_WIN->detail.data_display_info.regs_display_type
 		      != TUI_UNDEFINED_REGS)
-		    dpy_type =
-		      TUI_DATA_WIN->detail.data_display_info.regs_display_type;
+		    dpy_type
+		      = TUI_DATA_WIN->detail.data_display_info.regs_display_type;
 		  else
 		    dpy_type = TUI_GENERAL_REGS;
 		}
Index: tui/tui-winsource.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-winsource.c,v
retrieving revision 1.38
diff -u -p -r1.38 tui-winsource.c
--- tui/tui-winsource.c	6 Jan 2011 00:57:05 -0000	1.38
+++ tui/tui-winsource.c	7 Jan 2011 20:20:41 -0000
@@ -342,8 +342,9 @@ tui_horizontal_source_scroll (struct tui
 	  + num_to_scroll;
       else
 	{
-	  if ((offset = win_info->detail.source_info.horizontal_offset
-	       - num_to_scroll) < 0)
+	  offset = win_info->detail.source_info.horizontal_offset
+	    - num_to_scroll;
+	  if (offset < 0)
 	    offset = 0;
 	}
       win_info->detail.source_info.horizontal_offset = offset;

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