Update.
authorUlrich Drepper <drepper@redhat.com>
Tue, 28 Nov 2000 07:10:56 +0000 (07:10 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 28 Nov 2000 07:10:56 +0000 (07:10 +0000)
* test-skeleton.c: Mark timeout_handler with noreturn.
* iconv/skeleton.c (get16u): Add const to cast.
(get32u): Likewise.
* iconvdata/gb18030.c: Likewise.
* iconvdata/iso-2022-cn-ext.c: Likewise.
* iconvdata/ansi_x3.110.c: Add cast to avoid warning.
* iconvdata/big5.c: Likewise.
* iconvdata/big5hkscs.c: Likewise.
* iconvdata/iso_6937.c: Likewise.
* iconvdata/iso_6937-2.c: Likewise.
* iconvdata/t.61.c: Likewise.
* iconvdata/iso646.c: Add prototypes for gconv_init and gconv_env.
* iconvdata/unicode.c: Likewise.
* iconvdata/utf-16.c: Likewise.
* iconvdata/cns11643.h (ucs4_to_cns11643): Define needed as size_t.
* iconv/gconv_trans.c (__gconv_translit_find): Avoid one warning
with little code shuffling.

16 files changed:
ChangeLog
iconv/gconv_trans.c
iconv/skeleton.c
iconvdata/ansi_x3.110.c
iconvdata/big5.c
iconvdata/big5hkscs.c
iconvdata/cns11643.h
iconvdata/gb18030.c
iconvdata/iso-2022-cn-ext.c
iconvdata/iso646.c
iconvdata/iso_6937-2.c
iconvdata/iso_6937.c
iconvdata/t.61.c
iconvdata/unicode.c
iconvdata/utf-16.c
test-skeleton.c

index 205c02c..cbe8df0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,23 @@
 2000-11-27  Ulrich Drepper  <drepper@redhat.com>
 
+       * test-skeleton.c: Mark timeout_handler with noreturn.
+       * iconv/skeleton.c (get16u): Add const to cast.
+       (get32u): Likewise.
+       * iconvdata/gb18030.c: Likewise.
+       * iconvdata/iso-2022-cn-ext.c: Likewise.
+       * iconvdata/ansi_x3.110.c: Add cast to avoid warning.
+       * iconvdata/big5.c: Likewise.
+       * iconvdata/big5hkscs.c: Likewise.
+       * iconvdata/iso_6937.c: Likewise.
+       * iconvdata/iso_6937-2.c: Likewise.
+       * iconvdata/t.61.c: Likewise.
+       * iconvdata/iso646.c: Add prototypes for gconv_init and gconv_env.
+       * iconvdata/unicode.c: Likewise.
+       * iconvdata/utf-16.c: Likewise.
+       * iconvdata/cns11643.h (ucs4_to_cns11643): Define needed as size_t.
+       * iconv/gconv_trans.c (__gconv_translit_find): Avoid one warning
+       with little code shuffling.
+
        * sysdeps/powerpc/Makefile (CFLAGS-initfini.s): Add -O1 to avoid
        the problems introduced when the user selects -O3.
 
index 919d438..3d02b46 100644 (file)
@@ -366,8 +366,8 @@ __gconv_translit_find (struct trans_struct *trans)
          memset (newp, '\0', sizeof (struct known_trans));
 
          /* Store a copy of the module name.  */
-         newp->info.name = (char *) (newp + 1);
-         cp = __mempcpy ((char *) newp->info.name, trans->name, name_len);
+         newp->info.name = cp = (char *) (newp + 1);
+         cp = __mempcpy (cp, trans->name, name_len);
 
          newp->fname = cp;
 
index 06e3730..2b080ba 100644 (file)
@@ -127,8 +127,8 @@ static int to_object;
    loops we have other definitions which allow optimized access.  */
 #ifdef _STRING_ARCH_unaligned
 /* We can handle unaligned memory access.  */
-# define get16u(addr) *((uint16_t *) (addr))
-# define get32u(addr) *((uint32_t *) (addr))
+# define get16u(addr) *((__const uint16_t *) (addr))
+# define get32u(addr) *((__const uint32_t *) (addr))
 
 /* We need no special support for writing values either.  */
 # define put16u(addr, val) *((uint16_t *) (addr)) = (val)
index ed312a0..e1dd0ed 100644 (file)
@@ -474,7 +474,7 @@ static const char from_ucs4[][2] =
     uint32_t ch = get32 (inptr);                                             \
     const char *cp;                                                          \
                                                                              \
-    if (__builtin_expect (ch, 0)                                             \
+    if ((size_t) __builtin_expect (ch, 0)                                    \
        >= sizeof (from_ucs4) / sizeof (from_ucs4[0]))                        \
       {                                                                              \
        if (ch == 0x2c7)                                                      \
index 442fc8f..e06b446 100644 (file)
@@ -8484,7 +8484,7 @@ static const char from_ucs4_tab15[][2] =
     uint32_t ch = get32 (inptr);                                             \
     const char *cp;                                                          \
                                                                              \
-    if (__builtin_expect (ch, 0)                                             \
+    if ((size_t) __builtin_expect (ch, 0)                                    \
        >= sizeof (from_ucs4_tab1) / sizeof (from_ucs4_tab1[0]))              \
       switch (ch)                                                            \
        {                                                                     \
index 3112228..7f4a8c3 100644 (file)
@@ -11756,7 +11756,9 @@ static struct
     const char *cp = "";                                                     \
     int i;                                                                   \
                                                                              \
-    for (i = 0; i < sizeof (from_ucs4_idx) / sizeof (from_ucs4_idx[0]); ++i)  \
+    for (i = 0;                                                                      \
+        i < (int) (sizeof (from_ucs4_idx) / sizeof (from_ucs4_idx[0]));      \
+        ++i)                                                                 \
       {                                                                              \
        if (ch < from_ucs4_idx[i].from)                                       \
          break;                                                              \
index 8c73c06..176cb1f 100644 (file)
@@ -107,7 +107,7 @@ ucs4_to_cns11643 (uint32_t wch, char *s, size_t avail)
   unsigned int ch = (unsigned int) wch;
   char buf[2];
   const char *cp = buf;
-  int needed = 2;
+  size_t needed = 2;
 
   switch (ch)
     {
index e412f48..02ace16 100644 (file)
@@ -41825,7 +41825,7 @@ static const char __ucs_to_gb18030_tab63[][2] =
 #define LOOPFCT                        TO_LOOP
 #define BODY \
   {                                                                          \
-    uint32_t ch = *((uint32_t *) inptr);                                     \
+    uint32_t ch = *((const uint32_t *) inptr);                               \
     unsigned char buf[4];                                                    \
     const unsigned char *cp = buf;                                           \
     int len = 2;       /* This is the most often case.  */                   \
index 20f889e..d6ab2e8 100644 (file)
@@ -411,7 +411,7 @@ enum
     uint32_t ch;                                                             \
     size_t written = 0;                                                              \
                                                                              \
-    ch = *((uint32_t *) inptr);                                                      \
+    ch = *((const uint32_t *) inptr);                                        \
                                                                              \
     /* First see whether we can write the character using the currently              \
        selected character set.  */                                           \
index 4cfd98c..8de2639 100644 (file)
@@ -122,6 +122,7 @@ struct iso646_data
 };
 
 
+extern int gconv_init (struct __gconv_step *step);
 int
 gconv_init (struct __gconv_step *step)
 {
@@ -180,6 +181,7 @@ gconv_init (struct __gconv_step *step)
 }
 
 
+extern void gconv_end (struct __gconv_step *data);
 void
 gconv_end (struct __gconv_step *data)
 {
index 01c0c58..5f8956e 100644 (file)
@@ -490,7 +490,7 @@ static const char from_ucs4[][2] =
     uint32_t ch = get32 (inptr);                                             \
     const char *cp;                                                          \
                                                                              \
-    if (__builtin_expect (ch, 0)                                             \
+    if ((size_t) __builtin_expect (ch, 0)                                    \
        >= sizeof (from_ucs4) / sizeof (from_ucs4[0]))                        \
       {                                                                              \
        switch (ch)                                                           \
index ccae483..74b8990 100644 (file)
@@ -482,7 +482,7 @@ static const char from_ucs4[][2] =
     uint32_t ch = get32 (inptr);                                             \
     const char *cp;                                                          \
                                                                              \
-    if (__builtin_expect (ch, 0)                                             \
+    if ((size_t) __builtin_expect (ch, 0)                                    \
        >= sizeof (from_ucs4) / sizeof (from_ucs4[0]))                        \
       {                                                                              \
        int fail = 0;                                                         \
index 17a22a3..302226d 100644 (file)
@@ -457,7 +457,7 @@ static const char from_ucs4[][2] =
     uint32_t ch = get32 (inptr);                                             \
     const char *cp;                                                          \
                                                                              \
-    if (__builtin_expect (ch, 0)                                             \
+    if ((size_t) __builtin_expect (ch, 0)                                    \
        >= sizeof (from_ucs4) / sizeof (from_ucs4[0]))                        \
       {                                                                              \
        if (__builtin_expect (ch, 0) == 0x2126)                               \
index b8ea905..be72f4f 100644 (file)
@@ -89,6 +89,7 @@ struct unicode_data
 };
 
 
+extern int gconv_init (struct __gconv_step *step);
 int
 gconv_init (struct __gconv_step *step)
 {
@@ -135,6 +136,7 @@ gconv_init (struct __gconv_step *step)
 }
 
 
+extern void gconv_end (struct __gconv_step *data);
 void
 gconv_end (struct __gconv_step *data)
 {
index 91e3390..c40e296 100644 (file)
@@ -100,6 +100,7 @@ struct utf16_data
 };
 
 
+extern int gconv_init (struct __gconv_step *step);
 int
 gconv_init (struct __gconv_step *step)
 {
@@ -180,6 +181,7 @@ gconv_init (struct __gconv_step *step)
 }
 
 
+extern void gconv_end (struct __gconv_step *data);
 void
 gconv_end (struct __gconv_step *data)
 {
index 130ac93..2069bfc 100644 (file)
@@ -89,6 +89,7 @@ delete_temp_files (void)
 
 /* Timeout handler.  We kill the child and exit with an error.  */
 static void
+__attribute__ ((noreturn))
 timeout_handler (int sig __attribute__ ((unused)))
 {
   int killed;