aboutsummaryrefslogtreecommitdiff
path: root/libio
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-03-06 04:51:37 +0000
committerUlrich Drepper <drepper@redhat.com>2005-03-06 04:51:37 +0000
commit3cc4a09733deb0e9313f820e148ada9a3007e6b0 (patch)
tree1a078e7f4a335f0c559cbc44317348ae611ae515 /libio
parent103f1eb02d919d6df0a5d2d29cb58e403bf2a10a (diff)
downloadglibc-3cc4a09733deb0e9313f820e148ada9a3007e6b0.tar
glibc-3cc4a09733deb0e9313f820e148ada9a3007e6b0.tar.gz
glibc-3cc4a09733deb0e9313f820e148ada9a3007e6b0.tar.bz2
glibc-3cc4a09733deb0e9313f820e148ada9a3007e6b0.zip
* wcsmbs/wctob.c (wctob): Make buf array of unsigned char.
* sysdeps/generic/strchrnul.c: Add cast to avoid warning. * libio/iofwide.c: Add casts to avoid warnings. * stdio-common/printf-prs.c (parse_printf_format): Introduce new variable f to avoid warnings. * sysdeps/unix/sysv/linux/x86_64/makecontext.c (__makecontext): Fix a few casts to avoid warnings. * iconv/gconv_simple.c (internal_utf8_loop): Make start unsigned to avoid warning.
Diffstat (limited to 'libio')
-rw-r--r--libio/iofwide.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/libio/iofwide.c b/libio/iofwide.c
index 03124219ad..7af9a633f8 100644
--- a/libio/iofwide.c
+++ b/libio/iofwide.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -228,8 +228,8 @@ do_out (struct _IO_codecvt *codecvt, __mbstate_t *statep,
size_t dummy;
const unsigned char *from_start_copy = (unsigned char *) from_start;
- codecvt->__cd_out.__cd.__data[0].__outbuf = to_start;
- codecvt->__cd_out.__cd.__data[0].__outbufend = to_end;
+ codecvt->__cd_out.__cd.__data[0].__outbuf = (unsigned char *) to_start;
+ codecvt->__cd_out.__cd.__data[0].__outbufend = (unsigned char *) to_end;
codecvt->__cd_out.__cd.__data[0].__statep = statep;
status = DL_CALL_FCT (gs->__fct,
@@ -238,7 +238,7 @@ do_out (struct _IO_codecvt *codecvt, __mbstate_t *statep,
&dummy, 0, 0));
*from_stop = (wchar_t *) from_start_copy;
- *to_stop = codecvt->__cd_out.__cd.__data[0].__outbuf;
+ *to_stop = (char *) codecvt->__cd_out.__cd.__data[0].__outbuf;
switch (status)
{
@@ -294,15 +294,15 @@ do_unshift (struct _IO_codecvt *codecvt, __mbstate_t *statep,
int status;
size_t dummy;
- codecvt->__cd_out.__cd.__data[0].__outbuf = to_start;
- codecvt->__cd_out.__cd.__data[0].__outbufend = to_end;
+ codecvt->__cd_out.__cd.__data[0].__outbuf = (unsigned char *) to_start;
+ codecvt->__cd_out.__cd.__data[0].__outbufend = (unsigned char *) to_end;
codecvt->__cd_out.__cd.__data[0].__statep = statep;
status = DL_CALL_FCT (gs->__fct,
(gs, codecvt->__cd_out.__cd.__data, NULL, NULL,
NULL, &dummy, 1, 0));
- *to_stop = codecvt->__cd_out.__cd.__data[0].__outbuf;
+ *to_stop = (char *) codecvt->__cd_out.__cd.__data[0].__outbuf;
switch (status)
{
@@ -357,15 +357,16 @@ do_in (struct _IO_codecvt *codecvt, __mbstate_t *statep,
size_t dummy;
const unsigned char *from_start_copy = (unsigned char *) from_start;
- codecvt->__cd_in.__cd.__data[0].__outbuf = (char *) to_start;
- codecvt->__cd_in.__cd.__data[0].__outbufend = (char *) to_end;
+ codecvt->__cd_in.__cd.__data[0].__outbuf = (unsigned char *) to_start;
+ codecvt->__cd_in.__cd.__data[0].__outbufend = (unsigned char *) to_end;
codecvt->__cd_in.__cd.__data[0].__statep = statep;
status = DL_CALL_FCT (gs->__fct,
(gs, codecvt->__cd_in.__cd.__data, &from_start_copy,
- from_end, NULL, &dummy, 0, 0));
+ (const unsigned char *) from_end, NULL,
+ &dummy, 0, 0));
- *from_stop = from_start_copy;
+ *from_stop = (const char *) from_start_copy;
*to_stop = (wchar_t *) codecvt->__cd_in.__cd.__data[0].__outbuf;
switch (status)
@@ -454,13 +455,14 @@ do_length (struct _IO_codecvt *codecvt, __mbstate_t *statep,
int status;
size_t dummy;
- codecvt->__cd_in.__cd.__data[0].__outbuf = (char *) to_buf;
- codecvt->__cd_in.__cd.__data[0].__outbufend = (char *) &to_buf[max];
+ codecvt->__cd_in.__cd.__data[0].__outbuf = (unsigned char *) to_buf;
+ codecvt->__cd_in.__cd.__data[0].__outbufend = (unsigned char *) &to_buf[max];
codecvt->__cd_in.__cd.__data[0].__statep = statep;
status = DL_CALL_FCT (gs->__fct,
- (gs, codecvt->__cd_in.__cd.__data, &cp, from_end,
- NULL, &dummy, 0, 0));
+ (gs, codecvt->__cd_in.__cd.__data, &cp,
+ (const unsigned char *) from_end, NULL,
+ &dummy, 0, 0));
result = cp - (const unsigned char *) from_start;
#else