diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2003-07-19 16:09:51 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2003-07-19 16:09:51 +0000 |
commit | c68b0a84257413fa115b2177650e024f4546501f (patch) | |
tree | d243de95567f278205efde59b3ca0adf508e6084 /gcc/fixinc/fixincl.c | |
parent | fd7643fbe49e24ba9553f28b0548f4e525b43001 (diff) | |
download | gcc-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/fixincl.c')
-rw-r--r-- | gcc/fixinc/fixincl.c | 17 |
1 files changed, 8 insertions, 9 deletions
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; |