From: Remi Gacogne Date: Mon, 9 Oct 2023 09:36:28 +0000 (+0200) Subject: coverage: Do not call __gcov_dump() when using source-based coverage X-Git-Tag: rec-5.0.0-alpha2~20^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=827946b137e13ed95e3bfd2e6c919909337decda;p=thirdparty%2Fpdns.git coverage: Do not call __gcov_dump() when using source-based coverage It's useless and will do nothing. --- diff --git a/pdns/coverage.cc b/pdns/coverage.cc index 3cbfa40424..c996207ec8 100644 --- a/pdns/coverage.cc +++ b/pdns/coverage.cc @@ -25,11 +25,12 @@ #ifdef COVERAGE extern "C" { - // NOLINTNEXTLINE(bugprone-reserved-identifier): not ours - void __gcov_dump(void); #ifdef CLANG_COVERAGE // NOLINTNEXTLINE(bugprone-reserved-identifier): not ours int __llvm_profile_write_file(void); +#else /* CLANG_COVERAGE */ + // NOLINTNEXTLINE(bugprone-reserved-identifier): not ours + void __gcov_dump(void); #endif /* CLANG_COVERAGE */ } #endif /* COVERAGE */ @@ -39,9 +40,10 @@ namespace pdns::coverage void dumpCoverageData() { #ifdef COVERAGE - __gcov_dump(); #ifdef CLANG_COVERAGE __llvm_profile_write_file(); +#else /* CLANG_COVERAGE */ + __gcov_dump(); #endif /* CLANG_COVERAGE */ #endif /* COVERAGE */ }