diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-10 14:13:01 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-10 14:13:01 +0000 |
commit | 9e0943d49176f12d4ed1c181e4f51e59f33f8d18 (patch) | |
tree | 370e3a67dfb6cf6b6c2c94b4725e0c59b2c58223 /gcc/coverage.c | |
parent | 695aa232af03b5a927643d204fdd6ed80d2f1fb8 (diff) | |
download | gcc-9e0943d49176f12d4ed1c181e4f51e59f33f8d18.tar.gz |
* gcov-io.h: Update documentation.
(GCOV_UNSIGNED2STRING): New.
(GCOV_TAG_FUNCTION_LENGTH, GCOV_TAG_BLOCKS_LENGTH,
GCOV_TAG_ARCS_LENGTH, GCOV_TAG_COUNTER_LENGTH,
GCOV_TAG_SUMMARY_LENGTH): Adjust.
(GCOV_TAG_BLOCKS_NUM, GCOV_TAG_ARCS_NUM,
GCOV_TAG_COUNTER_NUM): New.
(GCOV_BLOCK_SIZE): Number of words.
(gcov_var): Adjust buffer type.
* gcov-io.c (gcov_write_bytes, gcov_read_bytes): Rename to ...
(gcov_write_words, gcov_read_words): ... here. Take a 4-byte word
count, not byte count.
(gcov_open): Adjust overread init.
(gcov_allocate, gcov_write_unsigned, gcov_write_counter,
gcov_write_string, gcov_write_tag, gcov_write_length,
gcov_write_tag_length): Adjust.
(gcov_read_unsigned, gcov_read_counter, gcov_read_string): Adjust.
(gcov_sync, gcov_seek): Adjust.
* gcov-dump.c (print_usage): Show gcc version only.
(dump_file): Use GCOV_UNSIGNED2STRING.
(tag_blocks, tag_arcs, tag_counters): Use GCOV_TAG_*_NUM macros.
* gcov.c (print_version): Show gcc version only.
(read_graph_file): Use GCOV_UNSIGNED2STRING. Use
GCOV_TAG_*_NUM macros.
(read_count_file): Use GCOV_UNSIGNED2STRING. Use
GCOV_TAG_COUNTER_LENGTH.
* coverage.c (read_counts_file): Use GCOV_UNSIGNED2STRING.
Use GCOV_TAG_COUNTER_NUM.
* libgcov.c (gcov_version): Use GCOV_UNSIGNED2STRING.
(__gcov_merge_single, __gcov_merge_delta): Use GCOV_CHECK.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69188 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/coverage.c')
-rw-r--r-- | gcc/coverage.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/coverage.c b/gcc/coverage.c index 0bc7a26cecb..252331776c4 100644 --- a/gcc/coverage.c +++ b/gcc/coverage.c @@ -167,10 +167,13 @@ read_counts_file (void) } else if ((tag = gcov_read_unsigned ()) != GCOV_VERSION) { - gcov_unsigned_t required = GCOV_VERSION; + char v[4], e[4]; + + GCOV_UNSIGNED2STRING (v, tag); + GCOV_UNSIGNED2STRING (e, GCOV_VERSION); warning ("`%s' is version `%.4s', expected version `%.4s'", - da_file_name, (const char *)&tag, (const char *)&required); + da_file_name, v, e); gcov_close (); return; } @@ -229,7 +232,7 @@ read_counts_file (void) else if (GCOV_TAG_IS_COUNTER (tag) && fn_ident) { counts_entry_t **slot, *entry, elt; - unsigned n_counts = length / 8; + unsigned n_counts = GCOV_TAG_COUNTER_NUM (length); unsigned ix; elt.ident = fn_ident; |