summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
Diffstat (limited to 'libc')
-rw-r--r--libc/stdio/_scanf.c8
-rw-r--r--libc/stdio/_vfprintf.c8
-rw-r--r--libc/stdio/vsnprintf.c4
3 files changed, 10 insertions, 10 deletions
diff --git a/libc/stdio/_scanf.c b/libc/stdio/_scanf.c
index bc95d0290..9bc8def55 100644
--- a/libc/stdio/_scanf.c
+++ b/libc/stdio/_scanf.c
@@ -731,7 +731,7 @@ void attribute_hidden __init_scan_cookie(register struct scan_cookie *sc,
sc->decpt = __UCLIBC_CURLOCALE_DATA.decimal_point;
sc->decpt_len = __UCLIBC_CURLOCALE_DATA.decimal_point_len;
#else /* __UCLIBC_HAS_LOCALE__ */
- sc->fake_decpt = sc->decpt = decpt_str;
+ sc->fake_decpt = sc->decpt = (unsigned char *) decpt_str;
sc->decpt_len = 1;
#endif /* __UCLIBC_HAS_LOCALE__ */
#ifdef __UCLIBC_HAS_WCHAR__
@@ -2087,7 +2087,7 @@ int attribute_hidden __psfs_do_numeric(psfs_t *psfs, struct scan_cookie *sc)
}
++psfs->cnt;
_store_inttype(psfs->cur_ptr, psfs->dataargtype,
- (uintmax_t) STRTOUIM(buf, NULL, base, 1-usflag));
+ (uintmax_t) STRTOUIM((char *) buf, NULL, base, 1-usflag));
}
return 0;
}
@@ -2101,7 +2101,7 @@ int attribute_hidden __psfs_do_numeric(psfs_t *psfs, struct scan_cookie *sc)
p = sc->fake_decpt;
do {
if (!*p) {
- strcpy(b, sc->decpt);
+ strcpy((char *) b, (char *) sc->decpt);
b += sc->decpt_len;
break;
}
@@ -2236,7 +2236,7 @@ int attribute_hidden __psfs_do_numeric(psfs_t *psfs, struct scan_cookie *sc)
{
__fpmax_t x;
char *e;
- x = __strtofpmax(buf, &e, exp_adjust);
+ x = __strtofpmax((char *) buf, &e, exp_adjust);
assert(!*e);
if (psfs->store) {
if (psfs->dataargtype & PA_FLAG_LONG_LONG) {
diff --git a/libc/stdio/_vfprintf.c b/libc/stdio/_vfprintf.c
index 571b99c2b..30ce7caef 100644
--- a/libc/stdio/_vfprintf.c
+++ b/libc/stdio/_vfprintf.c
@@ -1427,7 +1427,7 @@ static size_t _charpad(FILE * __restrict stream, int padchar, size_t numpad)
FMT_TYPE pad[1];
*pad = padchar;
- while (todo && (OUTNSTR(stream, pad, 1) == 1)) {
+ while (todo && (OUTNSTR(stream, (const unsigned char *) pad, 1) == 1)) {
--todo;
}
@@ -1831,7 +1831,7 @@ static int _do_one_spec(FILE * __restrict stream,
}
}
#else /* __UCLIBC_HAS_WCHAR__ */
- if (_outnstr(stream, s, slen) != slen) {
+ if (_outnstr(stream, (const unsigned char *) s, slen) != slen) {
return -1;
}
#endif /* __UCLIBC_HAS_WCHAR__ */
@@ -1886,7 +1886,7 @@ int VFPRINTF (FILE * __restrict stream,
{
count = -1;
} else if (_PPFS_init(&ppfs, format) < 0) { /* Bad format string. */
- OUTNSTR(stream, (const FMT_TYPE *) ppfs.fmtpos,
+ OUTNSTR(stream, (const unsigned char *) ppfs.fmtpos,
STRLEN((const FMT_TYPE *)(ppfs.fmtpos)));
#if defined(L_vfprintf) && !defined(NDEBUG)
fprintf(stderr,"\nIMbS: \"%s\"\n\n", format);
@@ -1901,7 +1901,7 @@ int VFPRINTF (FILE * __restrict stream,
}
if (format-s) { /* output any literal text in format string */
- if ( (r = OUTNSTR(stream, s, format-s)) != (format-s)) {
+ if ( (r = OUTNSTR(stream, (const unsigned char *) s, format-s)) != (format-s)) {
count = -1;
break;
}
diff --git a/libc/stdio/vsnprintf.c b/libc/stdio/vsnprintf.c
index 84215eb86..51aaf43d0 100644
--- a/libc/stdio/vsnprintf.c
+++ b/libc/stdio/vsnprintf.c
@@ -55,8 +55,8 @@ int vsnprintf(char *__restrict buf, size_t size,
/* Set these last since __bufputc initialization depends on
* __user_locking and only gets set if user locking is on. */
- f.__bufstart = buf;
- f.__bufend = buf + size;
+ f.__bufstart = (unsigned char *) buf;
+ f.__bufend = (unsigned char *) buf + size;
__STDIO_STREAM_INIT_BUFREAD_BUFPOS(&f);
__STDIO_STREAM_DISABLE_GETC(&f);
__STDIO_STREAM_ENABLE_PUTC(&f);