+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.
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;
}
else
{
if (error_message == NULL)
- error_message = strdup ("Expected ?");
+ error_message = (char *) strdup ("Expected ?");
error_message[9] = c;
return error_message;
}
return result;
}
else
- return 0;
+ return (enum gnu_v3_ctor_kinds) 0;
}
return result;
}
else
- return 0;
+ return (enum gnu_v3_dtor_kinds) 0;
}
#endif /* IN_GLIBCPP_V3 */
*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);
}
}
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++)
{
{
fibnode_t node;
- node = xcalloc (1, sizeof *node);
+ node = (fibnode_t) xcalloc (1, sizeof *node);
node->left = node;
node->right = node;
ctx->buflen = (left_over + add) & 63;
}
- buffer = (const char *) buffer + add;
+ buffer = (const void *) ((const char *) buffer + add);
len -= add;
}
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;
}
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;
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 ())
#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 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 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 (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 \
int size;
void *data ATTRIBUTE_UNUSED;
{
- return xmalloc (size);
+ return (void *) xmalloc (size);
}
static void
#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