X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2Fvfprintf.c;h=b6bb3bcf481936113e5453e9ab7d03d3ac7ae14d;hb=9ae8d5fc71a4b61ec826d58f03f7b543755fb1d4;hp=3512b4de7a1e49c88ce6ca9c7b0a92640b1b9c55;hpb=5cbd76c6b05b381f269e0e204e10690d69f1d6ea;p=musl diff --git a/src/stdio/vfprintf.c b/src/stdio/vfprintf.c index 3512b4de..b6bb3bcf 100644 --- a/src/stdio/vfprintf.c +++ b/src/stdio/vfprintf.c @@ -149,7 +149,7 @@ static void pop_arg(union arg *arg, int type, va_list *ap) static void out(FILE *f, const char *s, size_t l) { - __fwritex(s, l, f); + __fwritex((void *)s, l, f); } static void pad(FILE *f, char c, int w, int l, int fl) @@ -526,13 +526,13 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg, switch(t) { case 'n': switch(ps) { - case BARE: *(int *)arg.p = l; break; - case LPRE: *(long *)arg.p = l; break; - case LLPRE: *(long long *)arg.p = l; break; - case HPRE: *(unsigned short *)arg.p = l; break; - case HHPRE: *(unsigned char *)arg.p = l; break; - case ZTPRE: *(size_t *)arg.p = l; break; - case JPRE: *(uintmax_t *)arg.p = l; break; + case BARE: *(int *)arg.p = cnt; break; + case LPRE: *(long *)arg.p = cnt; break; + case LLPRE: *(long long *)arg.p = cnt; break; + case HPRE: *(unsigned short *)arg.p = cnt; break; + case HHPRE: *(unsigned char *)arg.p = cnt; break; + case ZTPRE: *(size_t *)arg.p = cnt; break; + case JPRE: *(uintmax_t *)arg.p = cnt; break; } continue; case 'p':