From 33ed6903d39b23f1bb5dfd9793fc244244f7b241 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 7 Feb 2004 15:57:44 +0000 Subject: [PATCH] Update. 2004-02-07 Andreas Jaeger * iconv/gconv_simple.c (ucs4le_internal_loop): Remove cast used as lvalue. (internal_ucs4le_loop_single): Likewise. (ucs4_internal_loop): Likewise. (BODY): Likewise. (internal_ucs4_loop_single): Likewise. * iconvdata/iso8859-1.c (BODY): Likewise. * iconvdata/cp1255.c (EMIT_SHIFT_TO_INIT): Likewise. * iconvdata/cp1258.c (EMIT_SHIFT_TO_INIT): Likewise. * iconvdata/gb18030.c (BODY): Likewise. * iconvdata/armscii-8.c (BODY): Likewise. * stdlib/msort.c (msort_with_tmp): Likewise. * iconv/gconv_open.c (__gconv_open): Remove conditional expression as lvalue. --- ChangeLog | 18 ++++++++++++++++++ iconvdata/armscii-8.c | 16 +++++++++++----- iconvdata/cp1255.c | 5 +++-- iconvdata/cp1258.c | 5 +++-- iconvdata/gb18030.c | 5 +++-- iconvdata/iso8859-1.c | 5 +++-- stdlib/msort.c | 10 +++++++--- 7 files changed, 48 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 87d92e3c4e..832487ad70 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2004-02-07 Andreas Jaeger + + * iconv/gconv_simple.c (ucs4le_internal_loop): Remove cast used as + lvalue. + (internal_ucs4le_loop_single): Likewise. + (ucs4_internal_loop): Likewise. + (BODY): Likewise. + (internal_ucs4_loop_single): Likewise. + * iconvdata/iso8859-1.c (BODY): Likewise. + * iconvdata/cp1255.c (EMIT_SHIFT_TO_INIT): Likewise. + * iconvdata/cp1258.c (EMIT_SHIFT_TO_INIT): Likewise. + * iconvdata/gb18030.c (BODY): Likewise. + * iconvdata/armscii-8.c (BODY): Likewise. + * stdlib/msort.c (msort_with_tmp): Likewise. + + * iconv/gconv_open.c (__gconv_open): Remove conditional expression + as lvalue. + 2004-02-06 Steven Munroe * sysdeps/powerpc/powerpc32/dl-machine.c: Declare __cache_line_size as diff --git a/iconvdata/armscii-8.c b/iconvdata/armscii-8.c index dbaf8be2ee..013202d9dc 100644 --- a/iconvdata/armscii-8.c +++ b/iconvdata/armscii-8.c @@ -1,5 +1,5 @@ /* Conversion to and from ARMSCII-8 - Copyright (C) 1997-1999, 2000-2002 Free Software Foundation, Inc. + Copyright (C) 1997-1999, 2000-2002, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -57,11 +57,17 @@ static const uint16_t map_from_armscii_8[0xfe - 0xa2 + 1] = uint_fast8_t ch = *inptr; \ \ if (ch <= 0xa0) \ - /* Upto and including 0xa0 the ARMSCII-8 corresponds to Unicode. */ \ - *((uint32_t *) outptr)++ = ch; \ + { \ + /* Upto and including 0xa0 the ARMSCII-8 corresponds to Unicode. */ \ + *((uint32_t *) outptr) = ch; \ + outptr += sizeof (uint32_t); \ + } \ else if (ch >= 0xa2 && ch <= 0xfe) \ - /* Use the table. */ \ - *((uint32_t *) outptr)++ = map_from_armscii_8[ch - 0xa2]; \ + { \ + /* Use the table. */ \ + *((uint32_t *) outptr) = map_from_armscii_8[ch - 0xa2]; \ + outptr += sizeof (uint32_t); \ + } \ else \ { \ /* This is an illegal character. */ \ diff --git a/iconvdata/cp1255.c b/iconvdata/cp1255.c index 6cccf526e6..b5f0b784d6 100644 --- a/iconvdata/cp1255.c +++ b/iconvdata/cp1255.c @@ -1,5 +1,5 @@ /* Conversion from and to CP1255. - Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1998, 2001, 2002, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998, and Bruno Haible , 2001. @@ -69,7 +69,8 @@ if (__builtin_expect (outbuf + 4 <= outend, 1)) \ { \ /* Write out the last character. */ \ - *((uint32_t *) outbuf)++ = data->__statep->__count >> 3; \ + *((uint32_t *) outbuf) = data->__statep->__count >> 3; \ + outbuf += sizeof (uint32_t); \ data->__statep->__count = 0; \ } \ else \ diff --git a/iconvdata/cp1258.c b/iconvdata/cp1258.c index 553d50b443..d1b2be4125 100644 --- a/iconvdata/cp1258.c +++ b/iconvdata/cp1258.c @@ -1,5 +1,5 @@ /* Conversion from and to CP1258. - Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1998, 2001, 2002, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998, and Bruno Haible , 2001. @@ -70,7 +70,8 @@ if (__builtin_expect (outbuf + 4 <= outend, 1)) \ { \ /* Write out the last character. */ \ - *((uint32_t *) outbuf)++ = data->__statep->__count >> 3; \ + *((uint32_t *) outbuf) = data->__statep->__count >> 3; \ + outbuf += sizeof (uint32_t); \ data->__statep->__count = 0; \ } \ else \ diff --git a/iconvdata/gb18030.c b/iconvdata/gb18030.c index 31f3c20939..807ef67739 100644 --- a/iconvdata/gb18030.c +++ b/iconvdata/gb18030.c @@ -1,5 +1,5 @@ /* Mapping tables for GBK handling. - Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Sean Chen , 1999. @@ -25769,7 +25769,8 @@ static const unsigned char __ucs_to_gb18030_tab2[8192][2] = } \ } \ \ - *((uint32_t *) outptr)++ = ch; \ + *((uint32_t *) outptr) = ch; \ + outptr += sizeof (uint32_t); \ } #define LOOP_NEED_FLAGS #define ONEBYTE_BODY \ diff --git a/iconvdata/iso8859-1.c b/iconvdata/iso8859-1.c index 60ab29d56f..632ebd6176 100644 --- a/iconvdata/iso8859-1.c +++ b/iconvdata/iso8859-1.c @@ -1,5 +1,5 @@ /* Conversion to and from ISO 8859-1. - Copyright (C) 1997-1999, 2000-2002 Free Software Foundation, Inc. + Copyright (C) 1997-1999, 2000-2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -35,7 +35,8 @@ #define MIN_NEEDED_OUTPUT MIN_NEEDED_TO #define LOOPFCT FROM_LOOP #define BODY \ - *((uint32_t *) outptr)++ = *inptr++; + *((uint32_t *) outptr) = *inptr++; \ + outptr += sizeof (uint32_t); #define ONEBYTE_BODY \ { \ return c; \ diff --git a/stdlib/msort.c b/stdlib/msort.c index 45d6a99b83..e69b4011c4 100644 --- a/stdlib/msort.c +++ b/stdlib/msort.c @@ -1,6 +1,6 @@ /* An alternative to qsort, with an identical interface. This file is part of the GNU C Library. - Copyright (C) 1992,95-97,99,2000,01,02 Free Software Foundation, Inc. + Copyright (C) 1992,95-97,99,2000,01,02,04 Free Software Foundation, Inc. Written by Mike Haertel, September 1988. The GNU C Library is free software; you can redistribute it and/or @@ -56,12 +56,16 @@ msort_with_tmp (void *b, size_t n, size_t s, __compar_fn_t cmp, if ((*cmp) (b1, b2) <= 0) { --n1; - *((op_t *) tmp)++ = *((op_t *) b1)++; + *((op_t *) tmp) = *((op_t *) b1); + tmp += sizeof (op_t); + b1 += sizeof (op_t); } else { --n2; - *((op_t *) tmp)++ = *((op_t *) b2)++; + *((op_t *) tmp) = *((op_t *) b2); + tmp += sizeof (op_t); + b2 += sizeof (op_t); } } else -- 2.11.4.GIT