diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-19 16:09:51 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-19 16:09:51 +0000 |
commit | 6edf18a6cb88793eb51776264f367e8880b77bd2 (patch) | |
tree | d243de95567f278205efde59b3ca0adf508e6084 /gcc/fixinc | |
parent | 12ef3745cdaccd74b4bd63acbca64f61908771ba (diff) | |
download | gcc-6edf18a6cb88793eb51776264f367e8880b77bd2.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69593 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fixinc')
-rw-r--r-- | gcc/fixinc/fixfixes.c | 2 | ||||
-rw-r--r-- | gcc/fixinc/fixincl.c | 17 | ||||
-rw-r--r-- | gcc/fixinc/fixlib.c | 4 | ||||
-rw-r--r-- | gcc/fixinc/server.c | 4 |
4 files changed, 13 insertions, 14 deletions
diff --git a/gcc/fixinc/fixfixes.c b/gcc/fixinc/fixfixes.c index b3c75ae1c1e..4ee57602b29 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 18a32fcfbec..92abcac49b9 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 49edda776d1..32f65d9d67a 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 4cb581086cd..f195f018afc 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); } |