diff options
author | Martin Liska <mliska@suse.cz> | 2018-06-07 06:21:35 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2018-06-07 04:21:35 +0000 |
commit | 6c086e8c75deaedb7db807d8008529747b275275 (patch) | |
tree | bf1b9fcbe6c7ae18bf10e75a89c7d5437a865a21 /libgcc/libgcov-util.c | |
parent | 37777cd0335f3220e4cbe263099af633f1e1c645 (diff) | |
download | gcc-6c086e8c75deaedb7db807d8008529747b275275.zip gcc-6c086e8c75deaedb7db807d8008529747b275275.tar.gz gcc-6c086e8c75deaedb7db807d8008529747b275275.tar.bz2 |
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.
From-SVN: r261260
Diffstat (limited to 'libgcc/libgcov-util.c')
-rw-r--r-- | libgcc/libgcov-util.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libgcc/libgcov-util.c b/libgcc/libgcov-util.c index 1d26176..37dd186 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; |