diff options
-rw-r--r-- | extra/locale/gen_collate.c | 2 | ||||
-rw-r--r-- | libc/misc/locale/locale.c | 2 | ||||
-rw-r--r-- | libc/stdio/_scanf.c | 5 | ||||
-rw-r--r-- | libc/stdio/_wfwrite.c | 4 | ||||
-rw-r--r-- | libc/stdio/vswprintf.c | 6 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/bits/uClibc_locale.h | 2 |
6 files changed, 11 insertions, 10 deletions
diff --git a/extra/locale/gen_collate.c b/extra/locale/gen_collate.c index 44f6215b6..15582c1ba 100644 --- a/extra/locale/gen_collate.c +++ b/extra/locale/gen_collate.c @@ -3993,5 +3993,5 @@ static void dump_collate(FILE *fp) fprintf(fp,"}; /* %8lu */\n", collate_pos); - fprintf(fp,"#define __lc_collate_data_LEN %d\n\n", collate_pos); + fprintf(fp,"#define __lc_collate_data_LEN %lu\n\n", collate_pos); } diff --git a/libc/misc/locale/locale.c b/libc/misc/locale/locale.c index bd448ba07..a2a898fdd 100644 --- a/libc/misc/locale/locale.c +++ b/libc/misc/locale/locale.c @@ -254,7 +254,7 @@ static void update_hr_locale(const unsigned char *spec) if (at) { const char *q; *n++ = '@'; - q = LOCALE_AT_MODIFIERS; + q = (char*) LOCALE_AT_MODIFIERS; do { if (q[1] == at) { n = stpcpy(n, q+2); 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) { diff --git a/libc/sysdeps/linux/common/bits/uClibc_locale.h b/libc/sysdeps/linux/common/bits/uClibc_locale.h index a6b381c95..6a5cab0e4 100644 --- a/libc/sysdeps/linux/common/bits/uClibc_locale.h +++ b/libc/sysdeps/linux/common/bits/uClibc_locale.h @@ -174,7 +174,7 @@ typedef struct __uclibc_locale_struct { const unsigned char *idx8ctype; const unsigned char *tbl8ctype; const unsigned char *idx8uplow; - const unsigned char *tbl8uplow; + const unsigned char *tbl8uplow; #ifdef __UCLIBC_HAS_WCHAR__ const unsigned char *idx8c2wc; const uint16_t *tbl8c2wc; /* char > 0x7f to wide char */ |