aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcov.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2003-07-19 14:47:15 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2003-07-19 14:47:15 +0000
commit703ad42b4be14b9b1e84816dede360721361ed86 (patch)
treef3d03226f923b6c64639256ed34bd193427950a7 /gcc/gcov.c
parent308ca868d327f306ac4b87741ed828a56e524fd0 (diff)
downloadgcc-703ad42b4be14b9b1e84816dede360721361ed86.zip
gcc-703ad42b4be14b9b1e84816dede360721361ed86.tar.gz
gcc-703ad42b4be14b9b1e84816dede360721361ed86.tar.bz2
alias.c [...]: Remove unnecessary casts.
* alias.c alloc-pool.c bitmap.c bitmap.h bt-load.c builtins.c c-common.c c-decl.c c-incpath.c c-lex.c c-opts.c c-parse.in c-pragma.c c-typeck.c calls.c cfg.c cfganal.c cfgloop.c cfgrtl.c collect2.c combine.c conflict.c coverage.c cppexp.c cppfiles.c cpphash.c cppinit.c cpplex.c cpplib.c cppmacro.c cppspec.c cpptrad.c cse.c cselib.c dbxout.c defaults.h df.c dominance.c dwarf2out.c dwarfout.c emit-rtl.c except.c expmed.c expr.c final.c fix-header.c flow.c fold-const.c function.c gcc.c gccspec.c gcov.c gcse.c genattr.c genattrtab.c genautomata.c genconditions.c genemit.c genextract.c genoutput.c genrecog.c gensupport.c ggc-page.c ggc-simple.c global.c graph.c haifa-sched.c hashtable.c integrate.c jump.c langhooks.c lcm.c line-map.c local-alloc.c loop.c mips-tdump.c mips-tfile.c mkdeps.c optabs.c params.c postreload.c prefix.c print-tree.c protoize.c ra-build.c ra-colorize.c ra-rewrite.c ra.c recog.c reg-stack.c regclass.c regmove.c regrename.c reload.c reload1.c reorg.c resource.c sbitmap.c sched-deps.c sched-rgn.c sched-vis.c sdbout.c simplify-rtx.c ssa-ccp.c ssa.c stmt.c stor-layout.c timevar.c tlink.c toplev.c tree-dump.c tree.c unroll.c unwind-dw2-fde.c varasm.c varray.c vmsdbgout.c xcoffout.c: Remove unnecessary casts. From-SVN: r69587
Diffstat (limited to 'gcc/gcov.c')
-rw-r--r--gcc/gcov.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/gcc/gcov.c b/gcc/gcov.c
index cc15f65..ff63274 100644
--- a/gcc/gcov.c
+++ b/gcc/gcov.c
@@ -520,7 +520,7 @@ process_file (const char *file_name)
for (fn = functions; fn; fn = fn->next)
solve_flow_graph (fn);
for (src = sources; src; src = src->next)
- src->lines = (line_t *) xcalloc (src->num_lines, sizeof (line_t));
+ src->lines = xcalloc (src->num_lines, sizeof (line_t));
for (fn = functions; fn; fn = fn->next)
{
coverage_t coverage;
@@ -682,7 +682,7 @@ find_source (const char *file_name)
if (!strcmp (file_name, src->name))
return src;
- src = (source_t *)xcalloc (1, sizeof (source_t));
+ src = xcalloc (1, sizeof (source_t));
src->name = xstrdup (file_name);
src->coverage.name = src->name;
src->index = sources ? sources->index + 1 : 1;
@@ -748,7 +748,7 @@ read_graph_file (void)
src = find_source (gcov_read_string ());
lineno = gcov_read_unsigned ();
- fn = (function_t *)xcalloc (1, sizeof (function_t));
+ fn = xcalloc (1, sizeof (function_t));
fn->name = function_name;
fn->ident = ident;
fn->checksum = checksum;
@@ -784,8 +784,7 @@ read_graph_file (void)
unsigned ix, num_blocks = GCOV_TAG_BLOCKS_NUM (length);
fn->num_blocks = num_blocks;
- fn->blocks
- = (block_t *)xcalloc (fn->num_blocks, sizeof (block_t));
+ fn->blocks = xcalloc (fn->num_blocks, sizeof (block_t));
for (ix = 0; ix != num_blocks; ix++)
fn->blocks[ix].flags = gcov_read_unsigned ();
}
@@ -806,7 +805,7 @@ read_graph_file (void)
if (dest >= fn->num_blocks)
goto corrupt;
- arc = (arc_t *) xcalloc (1, sizeof (arc_t));
+ arc = xcalloc (1, sizeof (arc_t));
arc->dst = &fn->blocks[dest];
arc->src = &fn->blocks[src];
@@ -851,8 +850,7 @@ read_graph_file (void)
else if (fn && tag == GCOV_TAG_LINES)
{
unsigned blockno = gcov_read_unsigned ();
- unsigned *line_nos
- = (unsigned *)xcalloc (length - 1, sizeof (unsigned));
+ unsigned *line_nos = xcalloc (length - 1, sizeof (unsigned));
if (blockno >= fn->num_blocks || fn->blocks[blockno].u.line.encoding)
goto corrupt;
@@ -1047,8 +1045,7 @@ read_count_file (void)
goto mismatch;
if (!fn->counts)
- fn->counts
- = (gcov_type *)xcalloc (fn->num_counts, sizeof (gcov_type));
+ fn->counts = xcalloc (fn->num_counts, sizeof (gcov_type));
for (ix = 0; ix != fn->num_counts; ix++)
fn->counts[ix] += gcov_read_counter ();