* 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.
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.
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;
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)
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) \
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) \
{ \
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; \
unsigned int ch = (unsigned int) wch;
char buf[2];
const char *cp = buf;
- int needed = 2;
+ size_t needed = 2;
switch (ch)
{
#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. */ \
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. */ \
};
+extern int gconv_init (struct __gconv_step *step);
int
gconv_init (struct __gconv_step *step)
{
}
+extern void gconv_end (struct __gconv_step *data);
void
gconv_end (struct __gconv_step *data)
{
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) \
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; \
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) \
};
+extern int gconv_init (struct __gconv_step *step);
int
gconv_init (struct __gconv_step *step)
{
}
+extern void gconv_end (struct __gconv_step *data);
void
gconv_end (struct __gconv_step *data)
{
};
+extern int gconv_init (struct __gconv_step *step);
int
gconv_init (struct __gconv_step *step)
{
}
+extern void gconv_end (struct __gconv_step *data);
void
gconv_end (struct __gconv_step *data)
{
/* Timeout handler. We kill the child and exit with an error. */
static void
+__attribute__ ((noreturn))
timeout_handler (int sig __attribute__ ((unused)))
{
int killed;