aboutsummaryrefslogtreecommitdiff
path: root/libgcc/libgcov-util.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2018-06-07 04:21:35 +0000
committerMartin Liska <mliska@suse.cz>2018-06-07 04:21:35 +0000
commit217085daef2b6ada7d839690f4b2079b54ad56aa (patch)
treebf1b9fcbe6c7ae18bf10e75a89c7d5437a865a21 /libgcc/libgcov-util.c
parent90850c0cc8ff67493459a04430e9214cedbea629 (diff)
Fix libgcov-driver-system bootstrap failure (PR bootstrap/86057).
2018-06-07 Martin Liska <mliska@suse.cz> PR bootstrap/86057 * libgcov-driver-system.c (replace_filename_variables): Use memcpy instead of mempcpy. (allocate_filename_struct): Do not allocate filename, allocate prefix and set it. (gcov_exit_open_gcda_file): Allocate memory for gf->filename here and properly copy content into it. * libgcov-driver.c (struct gcov_filename): Remove max_length field, change prefix from size_t into char *. (compute_summary): Do not calculate longest filename. (gcov_do_dump): Release memory of gf.filename after each file. * libgcov-util.c (compute_summary): Use new signature of compute_summary. (calculate_overlap): Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@261260 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc/libgcov-util.c')
-rw-r--r--libgcc/libgcov-util.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libgcc/libgcov-util.c b/libgcc/libgcov-util.c
index 1d26176940b..37dd186beaa 100644
--- a/libgcc/libgcov-util.c
+++ b/libgcc/libgcov-util.c
@@ -1202,7 +1202,7 @@ matched_gcov_info (const struct gcov_info *info1, const struct gcov_info *info2)
/* Defined in libgcov-driver.c. */
extern gcov_unsigned_t compute_summary (struct gcov_info *,
- struct gcov_summary *, size_t *);
+ struct gcov_summary *);
/* Compute the overlap score of two profiles with the head of GCOV_LIST1 and
GCOV_LIST1. Return a number ranging from [0.0, 1.0], with 0.0 meaning no
@@ -1215,15 +1215,14 @@ calculate_overlap (struct gcov_info *gcov_list1,
struct gcov_summary this_prg;
unsigned list1_cnt = 0, list2_cnt= 0, all_cnt;
unsigned int i, j;
- size_t max_length;
const struct gcov_info *gi_ptr;
struct overlap_t *all_infos;
- compute_summary (gcov_list1, &this_prg, &max_length);
+ compute_summary (gcov_list1, &this_prg);
overlap_sum_1 = (double) (this_prg.sum_all);
p1_sum_all = this_prg.sum_all;
p1_run_max = this_prg.run_max;
- compute_summary (gcov_list2, &this_prg, &max_length);
+ compute_summary (gcov_list2, &this_prg);
overlap_sum_2 = (double) (this_prg.sum_all);
p2_sum_all = this_prg.sum_all;
p2_run_max = this_prg.run_max;