From fbecd2e8ae0cc908aca7ea3ba18901639ede074c Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 29 May 2008 02:43:49 +0000 Subject: [PATCH] wint_t is short on Windows, and gcc warns: "wint_t is promoted to int when 2008-05-29 Tor Lillqvist * glib/gnulib/printf-args.c (printf_fetchargs): wint_t is short on Windows, and gcc warns: "wint_t is promoted to int when passed through ... (so you should pass int not wint_t to va_arg)." So do that then. svn path=/trunk/; revision=6956 --- ChangeLog | 7 +++++++ glib/gnulib/printf-args.c | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1d44e32..8534dc9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-05-29 Tor Lillqvist + + * glib/gnulib/printf-args.c (printf_fetchargs): wint_t is short on + Windows, and gcc warns: "wint_t is promoted to int when passed + through ... (so you should pass int not wint_t to va_arg)." So do + that then. + 2008-05-28 Michael Natterer * configure.in: add G_DISABLE_SINGLE_INCLUDES to CPPFLAGS diff --git a/glib/gnulib/printf-args.c b/glib/gnulib/printf-args.c index 91ca6d8..75a2a54 100644 --- a/glib/gnulib/printf-args.c +++ b/glib/gnulib/printf-args.c @@ -90,7 +90,11 @@ printf_fetchargs (va_list args, arguments *a) break; #ifdef HAVE_WINT_T case TYPE_WIDE_CHAR: +#ifdef _WIN32 + ap->a.a_wide_char = va_arg (args, int); +#else ap->a.a_wide_char = va_arg (args, wint_t); +#endif break; #endif case TYPE_STRING: -- 2.7.4