Mail Archives: djgpp-workers/2002/05/28/06:12:13
All,
Below is a patch that I've used in order to remove a warning when building
CVS LIBC with gcc 3.1. Any problems with this?
Andrew
--- src\debug\fsdb\orig\unassmbl.c 2002-04-17 07:14:18.000000000 +1000
+++ src\debug\fsdb\unassmbl.c 2002-05-28 19:47:00.000000000 +1000
@@ -1,3 +1,4 @@
+/* Copyright (C) 2002 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1997 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
@@ -20,6 +21,7 @@
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
+#include <stdarg.h>
#include "ed.h"
#include "unassmbl.h"
@@ -354,9 +356,12 @@ sib(void)
void
uprintf(char *s, ...)
{
- char **a = &s;
- vsprintf(ubufp, s, a+1);
+ va_list args;
+
+ va_start(args, s);
+ vsprintf(ubufp, s, args);
while (*ubufp) ubufp++;
+ va_end(args);
}
void
- Raw text -