glib r6958 - in branches/glib-2-16: . glib/gnulib



Author: tml
Date: Thu May 29 02:50:51 2008
New Revision: 6958
URL: http://svn.gnome.org/viewvc/glib?rev=6958&view=rev

Log:
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.



Modified:
   branches/glib-2-16/ChangeLog
   branches/glib-2-16/glib/gnulib/printf-args.c

Modified: branches/glib-2-16/glib/gnulib/printf-args.c
==============================================================================
--- branches/glib-2-16/glib/gnulib/printf-args.c	(original)
+++ branches/glib-2-16/glib/gnulib/printf-args.c	Thu May 29 02:50:51 2008
@@ -90,7 +90,11 @@
 	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:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]