openbsd-ports/misc/libutf8/patches/patch-src_stdio_printf-args_c
pvalchev 52241b9159 Fix va_arg types to match the rules:
- char gets promoted to int
- short gets promoted to int
(and unsigned equivalents)
2002-11-28 20:31:59 +00:00

25 lines
963 B
Plaintext

$OpenBSD: patch-src_stdio_printf-args_c,v 1.1 2002/11/28 20:31:59 pvalchev Exp $
--- src/stdio/printf-args.c.orig Thu Nov 28 13:18:56 2002
+++ src/stdio/printf-args.c Thu Nov 28 13:20:27 2002
@@ -27,16 +27,16 @@ int utf8_printf_fetchargs (va_list args,
for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++)
switch (ap->type) {
case TYPE_SCHAR:
- ap->a.a_schar = va_arg(args, signed char);
+ ap->a.a_schar = va_arg(args, int);
break;
case TYPE_UCHAR:
- ap->a.a_uchar = va_arg(args, unsigned char);
+ ap->a.a_uchar = va_arg(args, unsigned int);
break;
case TYPE_SHORT:
- ap->a.a_short = va_arg(args, short);
+ ap->a.a_short = va_arg(args, int);
break;
case TYPE_USHORT:
- ap->a.a_ushort = va_arg(args, unsigned short);
+ ap->a.a_ushort = va_arg(args, unsigned int);
break;
case TYPE_INT:
ap->a.a_int = va_arg(args, int);