summaryrefslogtreecommitdiff
path: root/gcc/java/gjavah.c
diff options
context:
space:
mode:
authoraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>2002-11-18 15:46:34 +0000
committeraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>2002-11-18 15:46:34 +0000
commit0cc50a21073c6b5cd595aef9df548583b6334a08 (patch)
treeeb8e95ee304089b9733a38cca3a66ca60c241853 /gcc/java/gjavah.c
parent73a8b678705422b54db1631f83b249392adf9a9c (diff)
downloadgcc-0cc50a21073c6b5cd595aef9df548583b6334a08.tar.gz
2002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de>
* buffer.c: Remove unnecessary casts. * check-init.c: Likewise. * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * gjavah.c: Likewise. * jcf-io.c: Likewise. * jcf-parse.c: Likewise. * jcf-path.c: Likewise. * jvspec.c: Likewise. * lang.c: Likewise. * lex.c: Likewise. * verify.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59224 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/gjavah.c')
-rw-r--r--gcc/java/gjavah.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/gcc/java/gjavah.c b/gcc/java/gjavah.c
index 1e8c701e24e..0c9d24990b7 100644
--- a/gcc/java/gjavah.c
+++ b/gcc/java/gjavah.c
@@ -834,13 +834,13 @@ DEFUN(print_method_info, (stream, jcf, name_index, sig_index, flags),
{
struct method_name *nn;
- nn = (struct method_name *) xmalloc (sizeof (struct method_name));
- nn->name = (char *) xmalloc (length);
+ nn = xmalloc (sizeof (struct method_name));
+ nn->name = xmalloc (length);
memcpy (nn->name, str, length);
nn->length = length;
nn->next = method_name_list;
nn->sig_length = JPOOL_UTF_LENGTH (jcf, sig_index);
- nn->signature = (char *) xmalloc (nn->sig_length);
+ nn->signature = xmalloc (nn->sig_length);
memcpy (nn->signature, JPOOL_UTF_DATA (jcf, sig_index),
nn->sig_length);
method_name_list = nn;
@@ -1151,7 +1151,7 @@ throwable_p (clname)
for (length = 0; clname[length] != ';' && clname[length] != '\0'; ++length)
;
- current = (unsigned char *) ALLOC (length);
+ current = ALLOC (length);
for (i = 0; i < length; ++i)
current[i] = clname[i] == '/' ? '.' : clname[i];
current[length] = '\0';
@@ -1189,7 +1189,7 @@ throwable_p (clname)
jcf_parse_class (&jcf);
tmp = (unsigned char *) super_class_name (&jcf, &super_length);
- super = (unsigned char *) ALLOC (super_length + 1);
+ super = ALLOC (super_length + 1);
memcpy (super, tmp, super_length);
super[super_length] = '\0';
@@ -1733,7 +1733,7 @@ print_include (out, utf8, len)
return;
}
- incl = (struct include *) xmalloc (sizeof (struct include));
+ incl = xmalloc (sizeof (struct include));
incl->name = xmalloc (len + 1);
strncpy (incl->name, utf8, len);
incl->name[len] = '\0';
@@ -1820,7 +1820,7 @@ add_namelet (name, name_limit, parent)
if (n == NULL)
{
- n = (struct namelet *) xmalloc (sizeof (struct namelet));
+ n = xmalloc (sizeof (struct namelet));
n->name = xmalloc (p - name + 1);
strncpy (n->name, name, p - name);
n->name[p - name] = '\0';
@@ -2376,25 +2376,25 @@ DEFUN(main, (argc, argv),
case OPT_PREPEND:
if (prepend_count == 0)
- prepend_specs = (char**) ALLOC (argc * sizeof (char*));
+ prepend_specs = ALLOC (argc * sizeof (char*));
prepend_specs[prepend_count++] = optarg;
break;
case OPT_FRIEND:
if (friend_count == 0)
- friend_specs = (char**) ALLOC (argc * sizeof (char*));
+ friend_specs = ALLOC (argc * sizeof (char*));
friend_specs[friend_count++] = optarg;
break;
case OPT_ADD:
if (add_count == 0)
- add_specs = (char**) ALLOC (argc * sizeof (char*));
+ add_specs = ALLOC (argc * sizeof (char*));
add_specs[add_count++] = optarg;
break;
case OPT_APPEND:
if (append_count == 0)
- append_specs = (char**) ALLOC (argc * sizeof (char*));
+ append_specs = ALLOC (argc * sizeof (char*));
append_specs[append_count++] = optarg;
break;
@@ -2481,7 +2481,7 @@ DEFUN(main, (argc, argv),
{
int dir_len = strlen (output_directory);
int i, classname_length = strlen (classname);
- current_output_file = (char*) ALLOC (dir_len + classname_length + 5);
+ current_output_file = ALLOC (dir_len + classname_length + 5);
strcpy (current_output_file, output_directory);
if (dir_len > 0 && output_directory[dir_len-1] != '/')
current_output_file[dir_len++] = '/';