]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
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 205c02c8f1d6bcc2115deafe39941e64dce49f73..cbe8df02a9b206543496977954722cdd272a5571 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 919d438abe88e6e6e2ac3edb2d7cf5e2558bcee3..3d02b461d6f02f1c0dab2ebfb8cb8c4c0e9fa59b 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 06e373013dfe6281784e0d56606e5fc86a8ad22a..2b080bacb6865e3d222b4bb7fbf9800b277cccf2 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 ed312a0285c6051fb801efe8ab11e06a89d6b7f3..e1dd0ed0a7d0386492c6eef24dda09c45440d368 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 442fc8f5c2209d6db64498c411cc9597b041ef51..e06b44609e4b6c944bdc77e93c6d84239ba31b5a 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 31122289fb17677f9bfbdafc442c879eac6a8e15..7f4a8c3bf2ced04a4a896e9f655f735e2ba7ecd8 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 8c73c06dff745b63c38fba8680c20f19dc85e18d..176cb1feab84f2942530132e2dad134ab06e5496 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 e412f481a3850a49afa78d4a07670f699ab529e4..02ace164b5017d833cdd6b3b004c2a41fe10d73a 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 20f889ee9dd319f039235e00c775c4a1c6bdf58d..d6ab2e8bbe8de9f5727005029ecb54a0c8757f2a 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 4cfd98c106b77491a4a30db436f3cccbd8c15ff7..8de263957462f2f91930059a20c1f2f6bd8e40a0 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 01c0c5857b49459252a1872705b7061d0174c5f2..5f8956e6b5a33b80d5b1e745a0ea00844f6ac8bf 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 ccae483c127d667953b23cacf62222325a649b81..74b899005a6d0259a6f6869ef570453c83b81ae0 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 17a22a3cd102bd3efd343920b8e93cb7663980c8..302226d8ccf79346b484ade0550a8d016b289eba 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 b8ea905de309842b5d09cc74d650420770b35b91..be72f4fcaf322bb4ea4c61ea599bf2f79cf182a0 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 91e3390cba48c7d04b064045f30e2811ddb071aa..c40e29685a1f18e139cebd13d8bed84852d88093 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 130ac9359bc520ccf34be39ccc4002ca8449161f..2069bfca281f5d2fa19ebe53d273ce858a659dbf 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;