* 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.
This commit is contained in:
Ulrich Drepper 2000-11-28 07:10:56 +00:00
parent d6b544fe23
commit 8c0b717095
16 changed files with 40 additions and 13 deletions

View File

@ -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.

View 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;

View 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)

View 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) \

View 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) \
{ \

View 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; \

View 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)
{

View 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. */ \

View 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. */ \

View 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)
{

View 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) \

View 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; \

View 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) \

View 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)
{

View 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)
{

View 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;