diff options
Diffstat (limited to 'libc/stdio')
| -rw-r--r-- | libc/stdio/_scanf.c | 5 | ||||
| -rw-r--r-- | libc/stdio/_wfwrite.c | 4 | ||||
| -rw-r--r-- | libc/stdio/vswprintf.c | 6 | 
3 files changed, 8 insertions, 7 deletions
| diff --git a/libc/stdio/_scanf.c b/libc/stdio/_scanf.c index 825156dc4..1fa6208d4 100644 --- a/libc/stdio/_scanf.c +++ b/libc/stdio/_scanf.c @@ -592,6 +592,7 @@ enum {  /**********************************************************************/  #ifdef L_vfwscanf +/* FIXME: "warning: the right operand of ">" changes sign when promoted" */  #if WINT_MIN > EOF  #error Unfortunately, we currently need wint_t to be able to store EOF.  Sorry.  #endif @@ -717,7 +718,7 @@ void attribute_hidden __init_scan_cookie(register struct scan_cookie *sc,  #ifdef __UCLIBC_HAS_GLIBC_DIGIT_GROUPING__  	if (*(sc->grouping = __UCLIBC_CURLOCALE_DATA.grouping)) { -		sc->thousands_sep = __UCLIBC_CURLOCALE_DATA.thousands_sep; +		sc->thousands_sep = (const unsigned char *) __UCLIBC_CURLOCALE_DATA.thousands_sep;  		sc->tslen = __UCLIBC_CURLOCALE_DATA.thousands_sep_len;  #ifdef __UCLIBC_HAS_WCHAR__  		sc->thousands_sep_wc = __UCLIBC_CURLOCALE_DATA.thousands_sep_wc; @@ -727,7 +728,7 @@ void attribute_hidden __init_scan_cookie(register struct scan_cookie *sc,  #ifdef __UCLIBC_HAS_FLOATS__  #ifdef __UCLIBC_HAS_LOCALE__ -	sc->decpt = __UCLIBC_CURLOCALE_DATA.decimal_point; +	sc->decpt = (const unsigned char *) __UCLIBC_CURLOCALE_DATA.decimal_point;  	sc->decpt_len = __UCLIBC_CURLOCALE_DATA.decimal_point_len;  #else  /* __UCLIBC_HAS_LOCALE__ */  	sc->fake_decpt = sc->decpt = (unsigned char *) decpt_str; diff --git a/libc/stdio/_wfwrite.c b/libc/stdio/_wfwrite.c index 8fa59f87d..81f5bd4e8 100644 --- a/libc/stdio/_wfwrite.c +++ b/libc/stdio/_wfwrite.c @@ -38,7 +38,7 @@ size_t attribute_hidden _wstdio_fwrite(const wchar_t *__restrict ws, size_t n,  		}  		if (count) {  			wmemcpy((wchar_t *)(stream->__bufpos), ws, count); -			stream->__bufpos = (char *)(((wchar_t *)(stream->__bufpos)) + count); +			stream->__bufpos = (unsigned char *)(((wchar_t *)(stream->__bufpos)) + count);  		}  		__STDIO_STREAM_VALIDATE(stream);  		return n; @@ -59,7 +59,7 @@ size_t attribute_hidden _wstdio_fwrite(const wchar_t *__restrict ws, size_t n,  					++r;		  /* 0 is returned when nul is reached. */  					pw = ws + count + r; /* pw was set to NULL, so correct. */  				} -				if (__stdio_fwrite(buf, r, stream) == r) { +				if (__stdio_fwrite((const unsigned char *)buf, r, stream) == r) {  					count = pw - ws;  					continue;  				} diff --git a/libc/stdio/vswprintf.c b/libc/stdio/vswprintf.c index beadb8a7d..10f7cc467 100644 --- a/libc/stdio/vswprintf.c +++ b/libc/stdio/vswprintf.c @@ -46,8 +46,8 @@ int vswprintf(wchar_t *__restrict buf, size_t size,  		size = ((SIZE_MAX - (size_t) buf)/sizeof(wchar_t));  	} -	f.__bufstart = (char *) buf; -	f.__bufend = (char *)(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_DISABLE_PUTC(&f); @@ -58,7 +58,7 @@ int vswprintf(wchar_t *__restrict buf, size_t size,  	if (f.__bufpos == f.__bufend) {  		rv = -1;  		if (size) { -			f.__bufpos = (char *)(((wchar_t *) f.__bufpos) - 1); +			f.__bufpos = (unsigned char *) (((wchar_t *) f.__bufpos) - 1);  		}  	}  	if (size) { | 
