wint_t is short on Windows, and gcc warns: "wint_t is promoted to int when

2008-05-29  Tor Lillqvist  <tml@novell.com>

	* 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)." And
	indeed g_print("%C", L'a') crashes. So do as gcc says then.


svn path=/branches/glib-2-16/; revision=6958
This commit is contained in:
Tor Lillqvist 2008-05-29 02:50:51 +00:00 committed by Tor Lillqvist
parent b833579574
commit 1077f0a1fb
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2008-05-29 Tor Lillqvist <tml@novell.com>
* 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)." And
indeed g_print("%C", L'a') crashes. So do as gcc says then.
2008-05-17 Wouter Bolsterlee <wbolster@svn.gnome.org>
* build: Fixup Tor's "build" svn:external commit. The

View File

@ -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: