mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-23 19:03:59 +08:00
gcov: Fix first time gcov info dump
This patch fixes an issue introduced by commit
ef9a53feae
:
gcc --coverage main.c && ./a.out
libgcov profiling error:a-main.gcda:Error writing
gcc/ChangeLog:
* gcov-io.cc (gcov_rewrite): Clear the file error status.
This commit is contained in:
parent
3a3eda000f
commit
880a9845dc
@ -79,11 +79,14 @@ gcov_is_error (void)
|
||||
}
|
||||
|
||||
#if IN_LIBGCOV
|
||||
/* Move to beginning of file and initialize for writing. */
|
||||
/* Move to beginning of file, initialize for writing, and clear file error
|
||||
status. */
|
||||
|
||||
GCOV_LINKAGE inline void
|
||||
gcov_rewrite (void)
|
||||
{
|
||||
gcov_var.mode = -1;
|
||||
gcov_var.error = GCOV_FILE_NO_ERROR;
|
||||
fseek (gcov_var.file, 0L, SEEK_SET);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user