aboutsummaryrefslogtreecommitdiff
path: root/gcc/fixinc
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2003-07-19 16:09:51 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2003-07-19 16:09:51 +0000
commitc68b0a84257413fa115b2177650e024f4546501f (patch)
treed243de95567f278205efde59b3ca0adf508e6084 /gcc/fixinc
parentfd7643fbe49e24ba9553f28b0548f4e525b43001 (diff)
downloadgcc-c68b0a84257413fa115b2177650e024f4546501f.zip
gcc-c68b0a84257413fa115b2177650e024f4546501f.tar.gz
gcc-c68b0a84257413fa115b2177650e024f4546501f.tar.bz2
fixfixes.c [...]: Remove unnecessary casts.
gcc: * fixinc/fixfixes.c fixinc/fixincl.c fixinc/fixlib.c fixinc/server.c objc/objc-act.c: Remove unnecessary casts. f: * com.c data.c expr.c fini.c g77spec.c global.c lab.c lex.c name.c sta.c stc.c std.c storag.c stt.c stw.c symbol.c target.c type.c: Remove unnecessary casts. cp: * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c semantics.c typeck.c: Remove unnecessary casts. java: * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary casts. treelang: * treetree.c: Remove unnecessary casts. From-SVN: r69593
Diffstat (limited to 'gcc/fixinc')
-rw-r--r--gcc/fixinc/fixfixes.c2
-rw-r--r--gcc/fixinc/fixincl.c17
-rw-r--r--gcc/fixinc/fixlib.c4
-rw-r--r--gcc/fixinc/server.c4
4 files changed, 13 insertions, 14 deletions
diff --git a/gcc/fixinc/fixfixes.c b/gcc/fixinc/fixfixes.c
index b3c75ae..4ee5760 100644
--- a/gcc/fixinc/fixfixes.c
+++ b/gcc/fixinc/fixfixes.c
@@ -783,7 +783,7 @@ main( argc, argv )
return EXIT_FAILURE;
}
- pz_tmptmp = (char*)xmalloc( strlen( argv[4] ) + 5 );
+ pz_tmptmp = xmalloc (strlen (argv[4]) + 5);
strcpy( pz_tmptmp, argv[4] );
/* Don't lose because "12345678" and "12345678X" map to the same
diff --git a/gcc/fixinc/fixincl.c b/gcc/fixinc/fixincl.c
index 18a32fc..92abcac 100644
--- a/gcc/fixinc/fixincl.c
+++ b/gcc/fixinc/fixincl.c
@@ -488,12 +488,12 @@ run_compiles ()
{
tFixDesc *p_fixd = fixDescList;
int fix_ct = FIX_COUNT;
- regex_t *p_re = (regex_t *) xmalloc (REGEX_COUNT * sizeof (regex_t));
+ regex_t *p_re = xmalloc (REGEX_COUNT * sizeof (regex_t));
/* Make sure compile_re does not stumble across invalid data */
- memset ( (void*)p_re, '\0', REGEX_COUNT * sizeof (regex_t) );
- memset ( (void*)&incl_quote_re, '\0', sizeof (regex_t) );
+ memset (p_re, '\0', REGEX_COUNT * sizeof (regex_t));
+ memset (&incl_quote_re, '\0', sizeof (regex_t));
compile_re (incl_quote_pat, &incl_quote_re, 1,
"quoted include", "run_compiles");
@@ -911,7 +911,7 @@ fix_with_system (p_fixd, pz_fix_file, pz_file_source, pz_temp_file)
+ strlen( pz_file_source )
+ strlen( pz_temp_file );
- pz_cmd = (char*)xmalloc( argsize );
+ pz_cmd = xmalloc (argsize);
strcpy( pz_cmd, pz_orig_dir );
pz_scan = pz_cmd + strlen( pz_orig_dir );
@@ -970,7 +970,7 @@ fix_with_system (p_fixd, pz_fix_file, pz_file_source, pz_temp_file)
}
/* Estimated buffer size we will need. */
- pz_scan = pz_cmd = (char*)xmalloc( argsize );
+ pz_scan = pz_cmd = xmalloc (argsize);
/* How much of it do we allot to the program name and its
arguments. */
parg_size = argsize - parg_size;
@@ -1010,7 +1010,7 @@ fix_with_system (p_fixd, pz_fix_file, pz_file_source, pz_temp_file)
while (pz_scan == (char*)NULL)
{
size_t already_filled = pz_scan_save - pz_cmd;
- pz_cmd = (char*)xrealloc( pz_cmd, argsize += 100 );
+ pz_cmd = xrealloc (pz_cmd, argsize += 100);
pz_scan_save = pz_scan = pz_cmd + already_filled;
parg_size += 100;
pz_scan = make_raw_shell_str( pz_scan, pArg,
@@ -1058,9 +1058,8 @@ start_fixer (read_fd, p_fixd, pz_fix_file)
else
{
tSCC z_cmd_fmt[] = "file='%s'\n%s";
- pz_cmd = (char*) xmalloc (strlen (p_fixd->patch_args[2])
- + sizeof( z_cmd_fmt )
- + strlen( pz_fix_file ));
+ pz_cmd = xmalloc (strlen (p_fixd->patch_args[2])
+ + sizeof (z_cmd_fmt) + strlen (pz_fix_file));
sprintf (pz_cmd, z_cmd_fmt, pz_fix_file, p_fixd->patch_args[2]);
pz_cmd_save = p_fixd->patch_args[2];
p_fixd->patch_args[2] = pz_cmd;
diff --git a/gcc/fixinc/fixlib.c b/gcc/fixinc/fixlib.c
index 49edda7..32f65d9 100644
--- a/gcc/fixinc/fixlib.c
+++ b/gcc/fixinc/fixlib.c
@@ -49,7 +49,7 @@ load_file_data (fp)
if (space_left < 1024)
{
space_left += 4096;
- pz_data = xrealloc ((void*)pz_data, space_left + space_used + 1 );
+ pz_data = xrealloc (pz_data, space_left + space_used + 1 );
}
size_read = fread (pz_data + space_used, 1, space_left, fp);
@@ -73,7 +73,7 @@ load_file_data (fp)
space_used += size_read;
} while (! feof (fp));
- pz_data = xrealloc ((void*)pz_data, space_used+1 );
+ pz_data = xrealloc (pz_data, space_used+1 );
pz_data[ space_used ] = NUL;
return pz_data;
diff --git a/gcc/fixinc/server.c b/gcc/fixinc/server.c
index 4cb5810..f195f01 100644
--- a/gcc/fixinc/server.c
+++ b/gcc/fixinc/server.c
@@ -111,7 +111,7 @@ load_data (fp)
size_t off = (size_t) (pz_scan - pz_text);
text_size += 4096;
- pz_text = xrealloc ((void *) pz_text, text_size);
+ pz_text = xrealloc (pz_text, text_size);
pz_scan = pz_text + off;
}
}
@@ -126,7 +126,7 @@ load_data (fp)
while ((pz_scan > pz_text) && ISSPACE (pz_scan[-1]))
pz_scan--;
*pz_scan = NUL;
- return xrealloc ((void *) pz_text, strlen (pz_text) + 1);
+ return xrealloc (pz_text, strlen (pz_text) + 1);
}