From 83f0a7b6f89dcb50b8a69e006001d064c6bb04b2 Mon Sep 17 00:00:00 2001 From: Shinichiro Hamaji Date: Tue, 28 Dec 2010 17:53:56 +0900 Subject: [PATCH] Test va_copy in tcctest.c --- tests/tcctest.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/tcctest.c b/tests/tcctest.c index 916db09..9ceca94 100644 --- a/tests/tcctest.c +++ b/tests/tcctest.c @@ -1786,14 +1786,15 @@ void manyarg_test(void) void vprintf1(const char *fmt, ...) { - va_list ap; + va_list ap, aq; const char *p; int c, i; double d; long long ll; long double ld; - va_start(ap, fmt); + va_start(aq, fmt); + va_copy(ap, aq); p = fmt; for(;;) { @@ -1829,6 +1830,7 @@ void vprintf1(const char *fmt, ...) } } the_end: + va_end(aq); va_end(ap); }