This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Suppress a warning for win32 native target
- From: Pierre Muller <muller at cerbere dot u-strasbg dot fr>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 06 Feb 2002 10:26:36 +0100
- Subject: [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