merge from gcc

This commit is contained in:
DJ Delorie 2002-09-20 13:45:20 +00:00
parent 6d30505267
commit 585cc78f65
9 changed files with 45 additions and 27 deletions

View file

@ -1,3 +1,21 @@
2002-09-19 John David Anglin <dave@hiuly1.hia.nrc.ca>
* cp-demangle.c (demangling_new): Cast 0 to enum.
(demangle_char): Cast return of strdup to char *.
(is_gnu_v3_mangled_ctor): Cast 0 to enum.
(is_gnu_v3_mangled_dtor): Likewise.
* cplus-dem.c (grow_vect): Cast return of xrealloc to void *.
(work_stuff_copy_to_from): Cast return of xmalloc to char **.
* fibheap.c (fibnode_new): Cast return of xcalloc to fibnode_t.
* md5.c (md5_process_bytes): Cast results back to const void *.
(md5_process_block): Add cast to const md5_uint32 *.
* regex.c (re_compile_fastmap): Cast enum to UCHAR_T.
* safe-ctype.c (L, XL, U, XU, D, P, _, C, Z, M, V, T, S): Add cast to
unsigned short.
* splay-tree.c (splay_tree_xmalloc_allocate): Cast return of xmalloc
to void *.
* vasprintf.c (int_vasprintf): Cast return of malloc to char *.
2002-09-19 Nick Clifton <nickc@redhat.com>
* README: Update email addresses for bugs and patches.

View file

@ -835,8 +835,8 @@ demangling_new (name, style)
return NULL;
}
dm->style = style;
dm->is_constructor = 0;
dm->is_destructor = 0;
dm->is_constructor = (enum gnu_v3_ctor_kinds) 0;
dm->is_destructor = (enum gnu_v3_dtor_kinds) 0;
return dm;
}
@ -974,7 +974,7 @@ demangle_char (dm, c)
else
{
if (error_message == NULL)
error_message = strdup ("Expected ?");
error_message = (char *) strdup ("Expected ?");
error_message[9] = c;
return error_message;
}
@ -3974,7 +3974,7 @@ is_gnu_v3_mangled_ctor (name)
return result;
}
else
return 0;
return (enum gnu_v3_ctor_kinds) 0;
}
@ -3996,7 +3996,7 @@ is_gnu_v3_mangled_dtor (name)
return result;
}
else
return 0;
return (enum gnu_v3_dtor_kinds) 0;
}
#endif /* IN_GLIBCPP_V3 */

View file

@ -946,7 +946,7 @@ grow_vect (old_vect, size, min_size, element_size)
*size *= 2;
if (*size < min_size)
*size = min_size;
*old_vect = xrealloc (*old_vect, *size * element_size);
*old_vect = (void *) xrealloc (*old_vect, *size * element_size);
}
}
@ -1206,7 +1206,7 @@ work_stuff_copy_to_from (to, from)
if (from->ntmpl_args)
to->tmpl_argvec
= xmalloc (from->ntmpl_args * sizeof (to->tmpl_argvec[0]));
= (char **) xmalloc (from->ntmpl_args * sizeof (to->tmpl_argvec[0]));
for (i = 0; i < from->ntmpl_args; i++)
{

View file

@ -66,7 +66,7 @@ fibnode_new ()
{
fibnode_t node;
node = xcalloc (1, sizeof *node);
node = (fibnode_t) xcalloc (1, sizeof *node);
node->left = node;
node->right = node;

View file

@ -229,7 +229,7 @@ md5_process_bytes (buffer, len, ctx)
ctx->buflen = (left_over + add) & 63;
}
buffer = (const char *) buffer + add;
buffer = (const void *) ((const char *) buffer + add);
len -= add;
}
@ -237,7 +237,7 @@ md5_process_bytes (buffer, len, ctx)
if (len > 64)
{
md5_process_block (buffer, len & ~63, ctx);
buffer = (const char *) buffer + (len & ~63);
buffer = (const void *) ((const char *) buffer + (len & ~63));
len &= 63;
}
@ -269,7 +269,7 @@ md5_process_block (buffer, len, ctx)
struct md5_ctx *ctx;
{
md5_uint32 correct_words[16];
const md5_uint32 *words = buffer;
const md5_uint32 *words = (const md5_uint32 *) buffer;
size_t nwords = len / sizeof (md5_uint32);
const md5_uint32 *endp = words + nwords;
md5_uint32 A = ctx->A;

View file

@ -4648,7 +4648,7 @@ PREFIX(re_compile_fastmap) (bufp)
while (1)
{
if (p == pend || *p == succeed)
if (p == pend || *p == (UCHAR_T) succeed)
{
/* We have reached the (effective) end of pattern. */
if (!FAIL_STACK_EMPTY ())

View file

@ -48,20 +48,20 @@ Boston, MA 02111-1307, USA. */
#define xd _sch_isxdigit
/* Masks. */
#define L lo|is |pr /* lower case letter */
#define XL lo|is|xd|pr /* lowercase hex digit */
#define U up|is |pr /* upper case letter */
#define XU up|is|xd|pr /* uppercase hex digit */
#define D di |xd|pr /* decimal digit */
#define P pn |pr /* punctuation */
#define _ pn|is |pr /* underscore */
#define L (const unsigned short) (lo|is |pr) /* lower case letter */
#define XL (const unsigned short) (lo|is|xd|pr) /* lowercase hex digit */
#define U (const unsigned short) (up|is |pr) /* upper case letter */
#define XU (const unsigned short) (up|is|xd|pr) /* uppercase hex digit */
#define D (const unsigned short) (di |xd|pr) /* decimal digit */
#define P (const unsigned short) (pn |pr) /* punctuation */
#define _ (const unsigned short) (pn|is |pr) /* underscore */
#define C cn /* control character */
#define Z nv |cn /* NUL */
#define M nv|sp |cn /* cursor movement: \f \v */
#define V vs|sp |cn /* vertical space: \r \n */
#define T nv|sp|bl|cn /* tab */
#define S nv|sp|bl|pr /* space */
#define C (const unsigned short) ( cn) /* control character */
#define Z (const unsigned short) (nv |cn) /* NUL */
#define M (const unsigned short) (nv|sp |cn) /* cursor movement: \f \v */
#define V (const unsigned short) (vs|sp |cn) /* vertical space: \r \n */
#define T (const unsigned short) (nv|sp|bl|cn) /* tab */
#define S (const unsigned short) (nv|sp|bl|pr) /* space */
/* Are we ASCII? */
#if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \

View file

@ -234,7 +234,7 @@ splay_tree_xmalloc_allocate (size, data)
int size;
void *data ATTRIBUTE_UNUSED;
{
return xmalloc (size);
return (void *) xmalloc (size);
}
static void

View file

@ -138,7 +138,7 @@ int_vasprintf (result, format, args)
#ifdef TEST
global_total_width = total_width;
#endif
*result = malloc (total_width);
*result = (char *) malloc (total_width);
if (*result != NULL)
return vsprintf (*result, format, *args);
else