diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-04-15 02:36:10 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-04-15 02:36:10 +0000 |
commit | 52a7f7c0c1aff76ca6c7f2d3c308bb2b8cd9c22a (patch) | |
tree | 9b3558d9c00141f6bacde1d2122188d87245d108 /stdio-common | |
parent | 18ddd3aa661a1f8802b37c2f8f9a89d108e315ee (diff) | |
download | glibc-52a7f7c0c1aff76ca6c7f2d3c308bb2b8cd9c22a.tar.gz glibc-52a7f7c0c1aff76ca6c7f2d3c308bb2b8cd9c22a.tar.xz glibc-52a7f7c0c1aff76ca6c7f2d3c308bb2b8cd9c22a.zip |
Update.
2003-04-14 Ulrich Drepper <drepper@redhat.com> * stdio-common/vfscanf.c: Add casts to avoid warnings.
Diffstat (limited to 'stdio-common')
-rw-r--r-- | stdio-common/vfscanf.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c index 93d909958d..8f8c99af8c 100644 --- a/stdio-common/vfscanf.c +++ b/stdio-common/vfscanf.c @@ -290,13 +290,13 @@ __vfscanf (FILE *s, const char *format, va_list argptr) #define is_hexa number_signed /* Decimal point character. */ #ifdef COMPILE_WSCANF - wchar_t decimal; + wint_t decimal; #else const char *decimal; #endif /* The thousands character of the current locale. */ #ifdef COMPILE_WSCANF - wchar_t thousands; + wint_t thousands; #else const char *thousands; #endif @@ -1254,7 +1254,7 @@ __vfscanf (FILE *s, const char *format, va_list argptr) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_INDIGITS0_WC + n); wcdigits[n] += from_level; - if (c == *wcdigits[n]) + if (c == (wint_t) *wcdigits[n]) { to_level = from_level; break; @@ -1316,7 +1316,7 @@ __vfscanf (FILE *s, const char *format, va_list argptr) for (n = 0; n < 10; ++n) { #ifdef COMPILE_WSCANF - if (c == *wcdigits[n]) + if (c == (wint_t) *wcdigits[n]) break; /* Advance the pointer to the next string. */ @@ -1441,7 +1441,7 @@ __vfscanf (FILE *s, const char *format, va_list argptr) if (!ISXDIGIT (c)) break; } - else if (!ISDIGIT (c) || c - L_('0') >= base) + else if (!ISDIGIT (c) || (int) (c - L_('0')) >= base) { if (base == 10 && (flags & GROUP) #ifdef COMPILE_WSCANF @@ -1762,7 +1762,8 @@ __vfscanf (FILE *s, const char *format, va_list argptr) else if (got_e && wp[wpsize - 1] == exp_char && (c == L_('-') || c == L_('+'))) ADDW (c); - else if (wpsize > 0 && !got_e && TOLOWER (c) == exp_char) + else if (wpsize > 0 && !got_e + && (CHAR_T) TOLOWER (c) == exp_char) { ADDW (exp_char); got_e = got_dot = 1; @@ -1993,7 +1994,7 @@ __vfscanf (FILE *s, const char *format, va_list argptr) wchar_t wc; for (wc = runp[-1] + 1; wc <= runp[1]; ++wc) - if (wc == c) + if ((wint_t) wc == c) break; if (wc <= runp[1] && !not_in) @@ -2010,9 +2011,9 @@ __vfscanf (FILE *s, const char *format, va_list argptr) } else { - if (*runp == c && !not_in) + if ((wint_t) *runp == c && !not_in) break; - if (*runp == c && not_in) + if ((wint_t) *runp == c && not_in) { ungetc (c, s); goto out; @@ -2211,7 +2212,7 @@ __vfscanf (FILE *s, const char *format, va_list argptr) wchar_t wc; for (wc = runp[-1] + 1; wc <= runp[1]; ++wc) - if (wc == c) + if ((wint_t) wc == c) break; if (wc <= runp[1] && !not_in) @@ -2228,9 +2229,9 @@ __vfscanf (FILE *s, const char *format, va_list argptr) } else { - if (*runp == c && !not_in) + if ((wint_t) *runp == c && !not_in) break; - if (*runp == c && not_in) + if ((wint_t) *runp == c && not_in) { ungetc (c, s); goto out2; |