This is the mail archive of the gdb-patches@sources.redhat.com 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]

[PATCH] Suppress a warning for win32 native target



The following patch suppresses a warning for
the sprintf function.

Committed as obvious.



2002-02-06  Pierre Muller  <muller@ics.u-strasbg.fr>
	* win32-nat.c (_initialize_check_for_gdb_ini): 
	Add typecast to sprintf argument to suppress a warning.


Index: win32-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/win32-nat.c,v
retrieving revision 1.46
diff -u -p -r1.46 win32-nat.c
--- win32-nat.c	2002/02/06 09:14:50	1.46
+++ win32-nat.c	2002/02/06 09:25:58
@@ -2009,7 +2009,8 @@ _initialize_check_for_gdb_ini (void)
  	{
  	  int len = strlen (oldini);
  	  char *newini = alloca (len + 1);
-	  sprintf (newini, "%.*s.gdbinit", len - (sizeof ("gdb.ini") - 1), oldini);
+	  sprintf (newini, "%.*s.gdbinit", 
+	    (int) (len - (sizeof ("gdb.ini") - 1)), oldini);
  	  warning ("obsolete '%s' found. Rename to '%s'.", oldini, newini);
  	}
      }



Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07  Fax : (33)-3-88-41-40-99


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