summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-11-28 07:10:56 +0000
committerUlrich Drepper <drepper@redhat.com>2000-11-28 07:10:56 +0000
commit8c0b7170956ed028472b4c1ef1d94608101da565 (patch)
treedf9e044b765e246efbce04f0af6ff7d1e82956fa
parentd6b544fe2361df88d93e68b86ddaea5a49b4094d (diff)
downloadglibc-8c0b7170956ed028472b4c1ef1d94608101da565.tar.gz
Update.
* 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.
-rw-r--r--ChangeLog18
-rw-r--r--iconv/gconv_trans.c4
-rw-r--r--iconv/skeleton.c4
-rw-r--r--iconvdata/ansi_x3.110.c2
-rw-r--r--iconvdata/big5.c2
-rw-r--r--iconvdata/big5hkscs.c4
-rw-r--r--iconvdata/cns11643.h2
-rw-r--r--iconvdata/gb18030.c2
-rw-r--r--iconvdata/iso-2022-cn-ext.c2
-rw-r--r--iconvdata/iso646.c2
-rw-r--r--iconvdata/iso_6937-2.c2
-rw-r--r--iconvdata/iso_6937.c2
-rw-r--r--iconvdata/t.61.c2
-rw-r--r--iconvdata/unicode.c2
-rw-r--r--iconvdata/utf-16.c2
-rw-r--r--test-skeleton.c1
16 files changed, 40 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 205c02c8f1..cbe8df02a9 100644
--- 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.
diff --git a/iconv/gconv_trans.c b/iconv/gconv_trans.c
index 919d438abe..3d02b461d6 100644
--- a/iconv/gconv_trans.c
+++ b/iconv/gconv_trans.c
@@ -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;
diff --git a/iconv/skeleton.c b/iconv/skeleton.c
index 06e373013d..2b080bacb6 100644
--- a/iconv/skeleton.c
+++ b/iconv/skeleton.c
@@ -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)
diff --git a/iconvdata/ansi_x3.110.c b/iconvdata/ansi_x3.110.c
index ed312a0285..e1dd0ed0a7 100644
--- a/iconvdata/ansi_x3.110.c
+++ b/iconvdata/ansi_x3.110.c
@@ -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) \
diff --git a/iconvdata/big5.c b/iconvdata/big5.c
index 442fc8f5c2..e06b44609e 100644
--- a/iconvdata/big5.c
+++ b/iconvdata/big5.c
@@ -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) \
{ \
diff --git a/iconvdata/big5hkscs.c b/iconvdata/big5hkscs.c
index 31122289fb..7f4a8c3bf2 100644
--- a/iconvdata/big5hkscs.c
+++ b/iconvdata/big5hkscs.c
@@ -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; \
diff --git a/iconvdata/cns11643.h b/iconvdata/cns11643.h
index 8c73c06dff..176cb1feab 100644
--- a/iconvdata/cns11643.h
+++ b/iconvdata/cns11643.h
@@ -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)
{
diff --git a/iconvdata/gb18030.c b/iconvdata/gb18030.c
index e412f481a3..02ace164b5 100644
--- a/iconvdata/gb18030.c
+++ b/iconvdata/gb18030.c
@@ -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. */ \
diff --git a/iconvdata/iso-2022-cn-ext.c b/iconvdata/iso-2022-cn-ext.c
index 20f889ee9d..d6ab2e8bbe 100644
--- a/iconvdata/iso-2022-cn-ext.c
+++ b/iconvdata/iso-2022-cn-ext.c
@@ -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. */ \
diff --git a/iconvdata/iso646.c b/iconvdata/iso646.c
index 4cfd98c106..8de2639574 100644
--- a/iconvdata/iso646.c
+++ b/iconvdata/iso646.c
@@ -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)
{
diff --git a/iconvdata/iso_6937-2.c b/iconvdata/iso_6937-2.c
index 01c0c5857b..5f8956e6b5 100644
--- a/iconvdata/iso_6937-2.c
+++ b/iconvdata/iso_6937-2.c
@@ -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) \
diff --git a/iconvdata/iso_6937.c b/iconvdata/iso_6937.c
index ccae483c12..74b899005a 100644
--- a/iconvdata/iso_6937.c
+++ b/iconvdata/iso_6937.c
@@ -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; \
diff --git a/iconvdata/t.61.c b/iconvdata/t.61.c
index 17a22a3cd1..302226d8cc 100644
--- a/iconvdata/t.61.c
+++ b/iconvdata/t.61.c
@@ -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) \
diff --git a/iconvdata/unicode.c b/iconvdata/unicode.c
index b8ea905de3..be72f4fcaf 100644
--- a/iconvdata/unicode.c
+++ b/iconvdata/unicode.c
@@ -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)
{
diff --git a/iconvdata/utf-16.c b/iconvdata/utf-16.c
index 91e3390cba..c40e29685a 100644
--- a/iconvdata/utf-16.c
+++ b/iconvdata/utf-16.c
@@ -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)
{
diff --git a/test-skeleton.c b/test-skeleton.c
index 130ac9359b..2069bfca28 100644
--- a/test-skeleton.c
+++ b/test-skeleton.c
@@ -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;