提交 1b7aee1d 编写于 作者: R Richard Levitte

Short is always promoted to int when passed as a function argument.

This is especially true when it's part of a '...'.
上级 4ba48ec4
......@@ -292,7 +292,7 @@ dopr(
case 'i':
switch (cflags) {
case DP_C_SHORT:
value = va_arg(args, short int);
value = (short int)va_arg(args, int);
break;
case DP_C_LONG:
value = va_arg(args, long int);
......@@ -315,8 +315,7 @@ dopr(
flags |= DP_F_UNSIGNED;
switch (cflags) {
case DP_C_SHORT:
value = va_arg(args,
unsigned short int);
value = (unsigned short int)va_arg(args, int);
break;
case DP_C_LONG:
value = (LLONG) va_arg(args,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册