\r
mbs = initial;\r
mbseqlen = wcrtomb(buf,\r
- (wchar_t)GETARG(wint_t), &mbs);\r
+ /* The compiler "knows" that wint_t may be smaller than an int so\r
+ it warns about it when used as the type argument to va_arg().\r
+ Since any type of parameter smaller than an int is promoted to an int on a\r
+ function call, we must call GETARG with type int instead of wint_t.\r
+ */\r
+ (wchar_t)GETARG(int), &mbs);\r
if (mbseqlen == (size_t)-1) {\r
fp->_flags |= __SERR;\r
goto error;\r
}\r
#else\r
if (flags & LONGINT)\r
- *buf = (wchar_t)GETARG(wint_t);\r
+ *buf = (wchar_t)GETARG(int);\r
else\r
*buf = (wchar_t)btowc(GETARG(int));\r
size = 1;\r
(*argtable) [n].pvoidarg = va_arg (ap, void *);\r
break;\r
case T_WINT:\r
- (*argtable) [n].wintarg = va_arg (ap, wint_t);\r
+ (*argtable) [n].wintarg = va_arg (ap, int);\r
break;\r
case TP_WCHAR:\r
(*argtable) [n].pwchararg = va_arg (ap, wchar_t *);\r